mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Speed up pkg/controller/endpointslice unit tests
This commit is contained in:
parent
f5fb1c93db
commit
98eb869d63
@ -1046,6 +1046,8 @@ func TestSyncService(t *testing.T) {
|
|||||||
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
||||||
// TODO(mborsz): Migrate this test to mock clock when possible.
|
// TODO(mborsz): Migrate this test to mock clock when possible.
|
||||||
func TestPodAddsBatching(t *testing.T) {
|
func TestPodAddsBatching(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
type podAdd struct {
|
type podAdd struct {
|
||||||
delay time.Duration
|
delay time.Duration
|
||||||
}
|
}
|
||||||
@ -1153,6 +1155,8 @@ func TestPodAddsBatching(t *testing.T) {
|
|||||||
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
||||||
// TODO(mborsz): Migrate this test to mock clock when possible.
|
// TODO(mborsz): Migrate this test to mock clock when possible.
|
||||||
func TestPodUpdatesBatching(t *testing.T) {
|
func TestPodUpdatesBatching(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
resourceVersion := 1
|
resourceVersion := 1
|
||||||
type podUpdate struct {
|
type podUpdate struct {
|
||||||
delay time.Duration
|
delay time.Duration
|
||||||
@ -1299,6 +1303,8 @@ func TestPodUpdatesBatching(t *testing.T) {
|
|||||||
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
|
||||||
// TODO(mborsz): Migrate this test to mock clock when possible.
|
// TODO(mborsz): Migrate this test to mock clock when possible.
|
||||||
func TestPodDeleteBatching(t *testing.T) {
|
func TestPodDeleteBatching(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
type podDelete struct {
|
type podDelete struct {
|
||||||
delay time.Duration
|
delay time.Duration
|
||||||
podName string
|
podName string
|
||||||
|
Loading…
Reference in New Issue
Block a user