Skip to content

Commit

Permalink
logging: check for exact # of logs in tests
Browse files Browse the repository at this point in the history
Change-Id: I780f3d2793660ad7c9753966e7067e50e9df44ad
Reviewed-on: https://code-review.googlesource.com/9031
Reviewed-by: Ross Light <[email protected]>
  • Loading branch information
Sarah Adams committed Nov 1, 2016
1 parent 4791784 commit 8c2dc61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logging/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func TestLogSync(t *testing.T) {
t.Log("fetching log entries: ", err)
return false
}
return len(got) >= len(want)
return len(got) == len(want)
})
if !ok {
t.Fatalf("timed out; got: %d, want: %d\n", len(got), len(want))
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestLogAndEntries(t *testing.T) {
t.Log("fetching log entries: ", err)
return false
}
return len(got) >= len(want)
return len(got) == len(want)
})
if !ok {
t.Fatalf("timed out; got: %d, want: %d\n", len(got), len(want))
Expand Down Expand Up @@ -318,7 +318,7 @@ func TestStandardLogger(t *testing.T) {
t.Log("fetching log entries: ", err)
return false
}
return len(got) >= 1
return len(got) == 1
})
if !ok {
t.Fatalf("timed out; got: %d, want: %d\n", len(got), 1)
Expand Down

0 comments on commit 8c2dc61

Please sign in to comment.