mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-09 23:25:33 -06:00
helper/resource: Fix TestRetry
This commit is contained in:
parent
2dc1c022d3
commit
8582f4df9f
@ -12,14 +12,14 @@ func TestRetry(t *testing.T) {
|
||||
tries := 0
|
||||
f := func() *RetryError {
|
||||
tries++
|
||||
if tries == 1 {
|
||||
if tries == 3 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return RetryableError(fmt.Errorf("error"))
|
||||
}
|
||||
|
||||
err := Retry(2*time.Second, f)
|
||||
err := Retry(10*time.Second, f)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user