mirror of
https://github.com/golang/go
synced 2024-09-24 03:10:16 -06:00
log: fix flaky test
Fixes #11272. Change-Id: I78d666c20f4f7cb7116d37fd66b5f8b7d66c53c4 Reviewed-on: https://go-review.googlesource.com/11234 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9490fbf755
commit
d1e7980d1b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user