mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-05 15:26:57 +08:00
fix: fix cidr-domain not works bug
This commit is contained in:
@@ -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("")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user