Skip to content

Commit

Permalink
fix: fix flaky test in kafkatopicsobserver (#38218)
Browse files Browse the repository at this point in the history
#### Description
Fixing a flaky test

#### Link to tracking issue
Fixes #38192
  • Loading branch information
wojtekzyla authored Feb 26, 2025
1 parent 47ff222 commit 2098453
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension/observer/kafkatopicsobserver/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ func TestCollectEndpointsAllConfigSettings(t *testing.T) {
Details: &observer.KafkaTopic{},
},
}
require.Equal(t, want, kEndpoints)
require.ElementsMatch(t, want, kEndpoints)

time.Sleep(5 * time.Second)
kEndpoints = obvs.ListEndpoints()
require.Equal(t, want, kEndpoints)
require.ElementsMatch(t, want, kEndpoints)

time.Sleep(5 * time.Second)
kEndpoints = obvs.ListEndpoints()
Expand All @@ -120,7 +120,7 @@ func TestCollectEndpointsAllConfigSettings(t *testing.T) {
Details: &observer.KafkaTopic{},
},
}
require.Equal(t, want, kEndpoints)
require.ElementsMatch(t, want, kEndpoints)

err = obvs.Shutdown(context.Background())
require.NoError(t, err)
Expand Down

0 comments on commit 2098453

Please sign in to comment.