Skip to content

Commit 1f01ca9

Browse files
authored
[Flaky unit test] Fix typo in TestPreventDefunctRuleReuse (#7469)
The test had an invalid usage of assert.EventuallyWithT: the assertions included in the condition function applied to the outer *testing.T instead of to the condition function parameter. After #7448, the test started failing due to the change in the implementation of assert.EventuallyWithT. Signed-off-by: Antonin Bas <[email protected]>
1 parent 92e2ad9 commit 1f01ca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/agent/nodeportlocal/npl_agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ func TestPreventDefunctRuleReuse(t *testing.T) {
947947
if !assert.NoError(t, err) {
948948
return
949949
}
950-
assert.EventuallyWithT(t, func(c *assert.CollectT) {
950+
assert.EventuallyWithT(t, func(t *assert.CollectT) {
951951
obj, exists, err := testData.svcInformer.GetIndexer().GetByKey(testSvc.Namespace + "/" + testSvc.Name)
952952
if !assert.NoError(t, err) || !assert.True(t, exists) {
953953
return

0 commit comments

Comments
 (0)