From 98eb869d633ecc09a8a9b93f4eca8f7c8bf5299b Mon Sep 17 00:00:00 2001 From: wzshiming Date: Fri, 5 Feb 2021 15:28:37 +0800 Subject: [PATCH] Speed up pkg/controller/endpointslice unit tests --- .../endpointslice/endpointslice_controller_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/controller/endpointslice/endpointslice_controller_test.go b/pkg/controller/endpointslice/endpointslice_controller_test.go index c220f919e86..3ec5a303aad 100644 --- a/pkg/controller/endpointslice/endpointslice_controller_test.go +++ b/pkg/controller/endpointslice/endpointslice_controller_test.go @@ -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. // TODO(mborsz): Migrate this test to mock clock when possible. func TestPodAddsBatching(t *testing.T) { + t.Parallel() + type podAdd struct { 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. // TODO(mborsz): Migrate this test to mock clock when possible. func TestPodUpdatesBatching(t *testing.T) { + t.Parallel() + resourceVersion := 1 type podUpdate struct { 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. // TODO(mborsz): Migrate this test to mock clock when possible. func TestPodDeleteBatching(t *testing.T) { + t.Parallel() + type podDelete struct { delay time.Duration podName string