From 8103188b9b9e8eeb3bcb53c8b64e2b83397e82ae Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Thu, 17 Dec 2020 11:31:40 -0600 Subject: [PATCH] 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 --- common/para/para_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/para/para_test.go b/common/para/para_test.go index e89f9360b..627528cf9 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)) }) }