From 4e52b04d8ce350252ba7d3eaf4706d2f8c7348a0 Mon Sep 17 00:00:00 2001 From: Vasil Averyanau Date: Tue, 17 Dec 2024 14:51:20 +0100 Subject: [PATCH] fix(tests): increases delays in `pkg/cloudmeta` unit tests. (#4175) 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,