Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
accommodate slow circleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Feb 26, 2020
1 parent 530a6e7 commit f31edd4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions clock/clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
)

func TestAlignedTickLossless(t *testing.T) {
period := 100 * time.Millisecond
lateToleration := 10 * time.Millisecond
period := 200 * time.Millisecond
lateToleration := 30 * time.Millisecond

// whatever time it is now, we expect the tick pointing to the next aligned tick,
// and we expect to see it slightly after that timestamp
Expand All @@ -24,7 +24,7 @@ func TestAlignedTickLossless(t *testing.T) {
if elapsed < expWithin || elapsed > expWithin+lateToleration {
t.Fatalf("expected to see tick v0 after %v to %v, but it took %v", expWithin, expWithin+lateToleration, elapsed)
}
case <-time.After(period + 10*time.Millisecond):
case <-time.After(period + 30*time.Millisecond):
t.Fatalf("did not get tick v0 on time")
}

Expand All @@ -37,7 +37,7 @@ func TestAlignedTickLossless(t *testing.T) {
if v1 != expTick {
t.Fatalf("expected v1 %v, got %v", expTick, v1)
}
case <-time.After(10 * time.Millisecond):
case <-time.After(30 * time.Millisecond):
t.Fatalf("did not get tick v1 on time")
}

Expand All @@ -47,7 +47,7 @@ func TestAlignedTickLossless(t *testing.T) {
if v2 != expTick {
t.Fatalf("expected v2 %v, got %v", expTick, v2)
}
case <-time.After(10 * time.Millisecond):
case <-time.After(30 * time.Millisecond):
t.Fatalf("did not get tick v2 on time")
}

Expand All @@ -57,7 +57,7 @@ func TestAlignedTickLossless(t *testing.T) {
if v3 != expTick {
t.Fatalf("expected v3 %v, got %v", expTick, v3)
}
case <-time.After(10 * time.Millisecond):
case <-time.After(30 * time.Millisecond):
t.Fatalf("did not get tick v3 on time")
}

Expand All @@ -76,7 +76,7 @@ func TestAlignedTickLossless(t *testing.T) {
if elapsed < expWithin-lateToleration || elapsed > expWithin+lateToleration {
t.Fatalf("expected to see tick v4 after %v to %v, but it took %v", expWithin-lateToleration, expWithin+lateToleration, elapsed)
}
case <-time.After(period + 10*time.Millisecond):
case <-time.After(period + 30*time.Millisecond):
t.Fatalf("did not get tick v4 on time")
}

Expand Down

0 comments on commit f31edd4

Please sign in to comment.