v.io/x/lib/nsync: Once again allow for slow machines when running timing test
cv_timeout_stress_test occasionally runs slower that 75% of expected speed on our test machines.
cv_timeout_stress_test.go:113: expected more than 67500 timeouts, got 64803
Changing the expactation to 50% to avoid false alarms.
Change-Id: Ifb7fd7f5d6cd5432b8ef6bbfab75771876dc7af8
diff --git a/nsync/cv_timeout_stress_test.go b/nsync/cv_timeout_stress_test.go
index a76669f..4312424 100644
--- a/nsync/cv_timeout_stress_test.go
+++ b/nsync/cv_timeout_stress_test.go
@@ -106,8 +106,8 @@
// Check that approximately the right number of timeouts have occurred.
// The 3 below is the three classes of thread produced before the Sleep().
- // The factor of 3/4 is to allow for randomness.
- expectedTimeouts := uint64(threadsPerValue * 3 * sleepSeconds * cvExpectedTimeoutsPerSec * 3 / 4)
+ // The factor of 1/2 is to allow for randomness and slow test machines.
+ expectedTimeouts := uint64(threadsPerValue * 3 * sleepSeconds * cvExpectedTimeoutsPerSec / 2)
timeoutsSeen := s.timeouts
if timeoutsSeen < expectedTimeouts {
t.Errorf("expected more than %d timeouts, got %d", expectedTimeouts, timeoutsSeen)