test/lib/testlibrary/jdk/testlibrary/Utils.java
Print this page
@@ -36,10 +36,11 @@
import java.util.List;
import java.util.Arrays;
import java.util.Collections;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
+import java.util.concurrent.TimeUnit;
/**
* Common library for various test helper functions.
*/
public final class Utils {
@@ -67,10 +68,16 @@
static {
String toFactor = System.getProperty("test.timeout.factor", "1.0");
TIMEOUT_FACTOR = Double.parseDouble(toFactor);
}
+ /**
+ * Returns the value of JTREG default test timeout in milliseconds
+ * converted to {@code long}.
+ */
+ public static final long DEFAULT_TEST_TIMEOUT = TimeUnit.SECONDS.toMillis(120);
+
private Utils() {
// Private constructor to prevent class instantiation
}
/**