Skip to content

Commit

Permalink
log: fix flaky test
Browse files Browse the repository at this point in the history
Fixes golang#11272.

Change-Id: I78d666c20f4f7cb7116d37fd66b5f8b7d66c53c4
Reviewed-on: https://go-review.googlesource.com/11234
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
josharian committed Jun 18, 2015
1 parent 9490fbf commit d1e7980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ func TestUTCFlag(t *testing.T) {
}
// It's possible we crossed a second boundary between getting now and logging,
// so add a second and try again. This should very nearly always work.
now.Add(time.Second)
now = now.Add(time.Second)
want = fmt.Sprintf("Test:%d/%.2d/%.2d %.2d:%.2d:%.2d hello\n",
now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute())
now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second())
if got == want {
return
}
Expand Down

0 comments on commit d1e7980

Please sign in to comment.