This is an automated email from the ASF dual-hosted git repository.
baodi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new 6c3ee77 fix: fix retryAssert (#996)
6c3ee77 is described below
commit 6c3ee77e453a028f4d2dadbb41c357d90aa8d813
Author: Jiaqi Shen <[email protected]>
AuthorDate: Wed Mar 22 10:35:04 2023 +0800
fix: fix retryAssert (#996)
---
pulsar/helper_for_test.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pulsar/helper_for_test.go b/pulsar/helper_for_test.go
index eda2d72..7bbf66e 100644
--- a/pulsar/helper_for_test.go
+++ b/pulsar/helper_for_test.go
@@ -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{}) {
+}