Skip to content

Commit

Permalink
fix(tests): increases delays in pkg/cloudmeta unit tests.
Browse files Browse the repository at this point in the history
This increases delay between 'fast' and 'slow' providers in metadata
unit tests to reduce chance of failure.

Fixes: #4173
  • Loading branch information
VAveryanov8 committed Dec 17, 2024
1 parent 0b4609a commit d215f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cloudmeta/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d215f40

Please sign in to comment.