Skip to content

Commit

Permalink
querylog: fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Mar 29, 2021
1 parent 5a56f0a commit cda92c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/querylog/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ func TestQueryLog_Search_findClient(t *testing.T) {
})

sp := &searchParams{
olderThan: time.Now(),
// Add some time to the "current" one to protect against
// low-resolution timers on some Windows machines.
//
// TODO(a.garipov): Use some kind of timeSource interface
// instead of relying on time.Now() in tests.
olderThan: time.Now().Add(10 * time.Second),
limit: 3,
}
entries, _ := l.search(sp)
Expand Down

0 comments on commit cda92c3

Please sign in to comment.