From: Cameron Moore Date: Thu, 17 Dec 2020 17:31:40 +0000 (-0600) Subject: para: Show more detail on failed time test X-Git-Tag: v0.80.0~16 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8103188b9b9e8eeb3bcb53c8b64e2b83397e82ae;p=brevno-suite%2Fhugo para: Show more detail on failed time test Give us more visibility into how badly a given host is failing in the time test. Updates #6963 --- diff --git a/common/para/para_test.go b/common/para/para_test.go index e89f9360..627528cf 100644 --- a/common/para/para_test.go +++ b/common/para/para_test.go @@ -81,6 +81,9 @@ func TestPara(t *testing.T) { c.Assert(r.Wait(), qt.IsNil) c.Assert(counter, qt.Equals, int64(n)) - c.Assert(time.Since(start) < n/2*time.Millisecond, qt.Equals, true) + + since := time.Since(start) + limit := n / 2 * time.Millisecond + c.Assert(since < limit, qt.Equals, true, qt.Commentf("%s >= %s", since, limit)) }) }