ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.234 by jsr166, Mon Jul 17 22:27:31 2017 UTC vs.
Revision 1.235 by jsr166, Sat Jul 22 18:23:59 2017 UTC

# Line 1116 | Line 1116 | public class JSR166TestCase extends Test
1116      }
1117  
1118      /**
1119     * Checks that thread does not terminate within the default
1120     * millisecond delay of {@code timeoutMillis()}.
1121     * TODO: REMOVEME
1122     */
1123    void assertThreadStaysAlive(Thread thread) {
1124        assertThreadStaysAlive(thread, timeoutMillis());
1125    }
1126
1127    /**
1128     * Checks that thread does not terminate within the given millisecond delay.
1129     * TODO: REMOVEME
1130     */
1131    void assertThreadStaysAlive(Thread thread, long millis) {
1132        try {
1133            // No need to optimize the failing case via Thread.join.
1134            delay(millis);
1135            assertTrue(thread.isAlive());
1136        } catch (InterruptedException fail) {
1137            threadFail("Unexpected InterruptedException");
1138        }
1139    }
1140
1141    /**
1142     * Checks that the threads do not terminate within the default
1143     * millisecond delay of {@code timeoutMillis()}.
1144     * TODO: REMOVEME
1145     */
1146    void assertThreadsStayAlive(Thread... threads) {
1147        assertThreadsStayAlive(timeoutMillis(), threads);
1148    }
1149
1150    /**
1151     * Checks that the threads do not terminate within the given millisecond delay.
1152     * TODO: REMOVEME
1153     */
1154    void assertThreadsStayAlive(long millis, Thread... threads) {
1155        try {
1156            // No need to optimize the failing case via Thread.join.
1157            delay(millis);
1158            for (Thread thread : threads)
1159                assertTrue(thread.isAlive());
1160        } catch (InterruptedException fail) {
1161            threadFail("Unexpected InterruptedException");
1162        }
1163    }
1164
1165    /**
1119       * Checks that future.get times out, with the default timeout of
1120       * {@code timeoutMillis()}.
1121       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines