Merge pull request #589 from prometheus/beorn/test2

Unflake TestGoCollectorGC
This commit is contained in:
Björn Rabenstein 2019-05-26 23:19:56 +02:00 committed by GitHub
commit 33a2efdc9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -138,11 +138,11 @@ func TestGoCollectorGC(t *testing.T) {
close(waitCh)
continue
}
if diff := *pb.GetSummary().SampleCount - oldGC; diff != 1 {
t.Errorf("want 1 new garbage collection run, got %d", diff)
if diff := *pb.GetSummary().SampleCount - oldGC; diff < 1 {
t.Errorf("want at least 1 new garbage collection run, got %d", diff)
}
if diff := *pb.GetSummary().SampleSum - oldPause; diff <= 0 {
t.Errorf("want moar pause, got %f", diff)
t.Errorf("want an increase in pause time, got a change of %f", diff)
}
case <-time.After(1 * time.Second):
t.Fatalf("expected collect timed out")