Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
gps: source cache: fix flaky bolt test clock by forcing future timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Sep 6, 2017
1 parent d3e738d commit bbb11a8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/gps/source_cache_bolt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,7 @@ func TestBoltCacheTimeout(t *testing.T) {

// Read with a later epoch. Expect no *timestamped* values, since all were < `after`.
{
after := time.Now()
if after.Unix() <= start.Unix() {
// Ensure a future timestamp.
after = start.Add(10 * time.Second)
}
after := start.Add(1000 * time.Hour)
bc, err = newBoltCache(cpath, after.Unix(), logger)
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit bbb11a8

Please sign in to comment.