From d215f40a1c6f65dc1d5418d310878e78c3d212d0 Mon Sep 17 00:00:00 2001 From: Vasil Averyanau Date: Tue, 17 Dec 2024 12:51:04 +0100 Subject: [PATCH] fix(tests): increases delays in `pkg/cloudmeta` unit tests. This increases delay between 'fast' and 'slow' providers in metadata unit tests to reduce chance of failure. Fixes: #4173 --- pkg/cloudmeta/metadata_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cloudmeta/metadata_test.go b/pkg/cloudmeta/metadata_test.go index 363819400..a2d5b782d 100644 --- a/pkg/cloudmeta/metadata_test.go +++ b/pkg/cloudmeta/metadata_test.go @@ -40,7 +40,7 @@ func TestGetInstanceMetadata(t *testing.T) { name: "when there is more than one active provider, fastest should be returned", providers: []CloudMetadataProvider{ newTestProvider(t, "test_provider_1", "x-test-1", 1*time.Millisecond, nil), - newTestProvider(t, "test_provider_2", "x-test-2", 2*time.Millisecond, nil), + newTestProvider(t, "test_provider_2", "x-test-2", 100*time.Millisecond, nil), }, expectedErr: false, @@ -53,7 +53,7 @@ func TestGetInstanceMetadata(t *testing.T) { name: "when there is more than one active provider, but fastest returns err", providers: []CloudMetadataProvider{ newTestProvider(t, "test_provider_1", "x-test-1", 1*time.Millisecond, errors.New("something went wront")), - newTestProvider(t, "test_provider_2", "x-test-2", 2*time.Millisecond, nil), + newTestProvider(t, "test_provider_2", "x-test-2", 100*time.Millisecond, nil), }, expectedErr: false,