fix: fix cidr-domain not works bug

This commit is contained in:
fengcaiwen
2023-07-17 12:54:00 +08:00
parent 6a4c787006
commit b0ed57794f
3 changed files with 97 additions and 27 deletions

View File

@@ -345,3 +345,19 @@ func init() {
log.Fatal(err)
}
}
func TestWaitBackoff(t *testing.T) {
var last = time.Now()
_ = retry.OnError(
wait.Backoff{
Steps: 10,
Duration: time.Millisecond * 50,
}, func(err error) bool {
return err != nil
}, func() error {
now := time.Now()
fmt.Println(now.Sub(last).String())
last = now
return fmt.Errorf("")
})
}