Skip to content

Commit

Permalink
fix: fix retryAssert (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleiphir2769 committed Mar 22, 2023
1 parent 04ad521 commit 6c3ee77
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pulsar/helper_for_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,14 @@ func retryAssert(t assert.TestingT, times int, milliseconds int, update func(),
for i := 0; i < times; i++ {
time.Sleep(time.Duration(milliseconds) * time.Millisecond)
update()
if assert(nil) {
if assert(fakeAssertT{}) {
break
}
}
assert(t)
}

type fakeAssertT struct{}

func (fa fakeAssertT) Errorf(format string, args ...interface{}) {
}

0 comments on commit 6c3ee77

Please sign in to comment.