Merge "Fix TimeoutInputStreamTest, TimeoutOutputStreamTest assertions"

This commit is contained in:
Robin Rosenberg 2010-02-17 17:12:17 -05:00 committed by Code Review
commit 1dcd2cdfd8
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009, Google Inc.
* Copyright (C) 2009-2010, Google Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@ -170,7 +170,7 @@ private void assertTimeout() {
// 50 ms of the expected timeout.
//
final long wait = now() - start;
assertTrue(Math.abs(wait - timeout) < 50);
assertTrue("waited only " + wait + " ms", timeout - wait < 50);
}
private static List<Thread> active() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009, Google Inc.
* Copyright (C) 2009-2010, Google Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@ -251,7 +251,7 @@ private void assertTimeout() {
// 50 ms of the expected timeout.
//
final long wait = now() - start;
assertTrue(Math.abs(wait - timeout) < 50);
assertTrue("waited only " + wait + " ms", timeout - wait < 50);
}
private static List<Thread> active() {