]> Cypherpunks.ru repositories - gostls13.git/commit
test: make maplinear more robust
authorRuss Cox <rsc@golang.org>
Mon, 27 Oct 2014 22:59:02 +0000 (18:59 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 27 Oct 2014 22:59:02 +0000 (18:59 -0400)
commit0f698be54742be2d66c044b61267782272777ff8
treebd2b470c91143d1ce5fc7879d42d60a2567ad557
parentaec37e7cb1d34896f65948e88465376ceca68e0c
test: make maplinear more robust

The test just doubled a certain number of times
and then gave up. On a mostly fast but occasionally
slow machine this may never make the test run
long enough to see the linear growth.

Change test to keep doubling until the first round
takes at least a full second, to reduce the effect of
occasional scheduling or other jitter.

The failure we saw had a time for the first round
of around 100ms.

Note that this test still passes once it sees a linear
effect, even with a very small total time.
The timeout here only applies to how long the execution
must be to support a reported failure.

LGTM=khr
R=khr
CC=golang-codereviews, rlh
https://golang.org/cl/164070043
test/maplinear.go