projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba147e
)
para: Show more detail on failed time test
author
Cameron Moore
<moorereason@gmail.com>
Thu, 17 Dec 2020 17:31:40 +0000
(11:31 -0600)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Thu, 17 Dec 2020 21:19:17 +0000
(22:19 +0100)
Give us more visibility into how badly a given host is failing in the
time test.
Updates #6963
common/para/para_test.go
patch
|
blob
|
history
diff --git
a/common/para/para_test.go
b/common/para/para_test.go
index e89f9360b60e85cb99e30ad98d2aee7864f78d78..627528cf9ae200af02e6c1716f8120a7d912e192 100644
(file)
--- 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))
})
}