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
This commit is contained in:
Cameron Moore 2020-12-17 11:31:40 -06:00 committed by Bjørn Erik Pedersen
parent 3ba147e702
commit 8103188b9b

View file

@ -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))
})
}