Skip to content

Commit

Permalink
increase timing buffer in sync testing
Browse files Browse the repository at this point in the history
  • Loading branch information
David Vorick committed Apr 14, 2017
1 parent 6573361 commit bb4e403
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sync/trymutex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestTryMutexTimed(t *testing.T) {
if wait < time.Millisecond*450 {
t.Error("lock did not wait the correct amount of time before timing out", wait)
}
if wait > time.Millisecond*700 {
if wait > time.Millisecond*900 {
t.Error("lock waited too long before timing out", wait)
}

Expand Down Expand Up @@ -154,7 +154,7 @@ func TestTryMutexTimedConcurrent(t *testing.T) {
if wait < time.Millisecond*450 {
t.Error("lock did not wait the correct amount of time before timing out:", wait)
}
if wait > time.Millisecond*700 {
if wait > time.Millisecond*900 {
t.Error("lock waited too long before timing out", wait)
}

Expand All @@ -167,9 +167,9 @@ func TestTryMutexTimedConcurrent(t *testing.T) {
// the lock will be idle for 500 milliseconds.
t.Error("Lock should have timed out")
}
if !tm.TryLockTimed(time.Millisecond * 750) {
if !tm.TryLockTimed(time.Millisecond * 950) {
// Lock should be successful - the above thread should finish in under
// 750 milliseconds.
// 950 milliseconds.
t.Error("Lock should have been successful")
}
tm.Unlock()
Expand Down

0 comments on commit bb4e403

Please sign in to comment.