Skip to content

Commit

Permalink
retrysync test have shorter sleep for faster testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mgb committed Jan 27, 2023
1 parent c5799e1 commit 765bc73
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/retrysync/once_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import (
)

func TestOnce_noReset(t *testing.T) {
t.Parallel()

var o Once
var i int64

f := func() {
time.Sleep(1 * time.Second)
time.Sleep(100 * time.Millisecond)
atomic.AddInt64(&i, 1)
}

Expand All @@ -34,11 +36,13 @@ func TestOnce_noReset(t *testing.T) {
}

func TestOnce_multipleResets(t *testing.T) {
t.Parallel()

var o Once
var i int64

f := func() {
time.Sleep(1 * time.Second)
time.Sleep(100 * time.Millisecond)
atomic.AddInt64(&i, 1)
}

Expand Down

0 comments on commit 765bc73

Please sign in to comment.