mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8366775: TestCompileTaskTimeout should use timeoutFactor
Reviewed-by: chagedorn, rcastanedalo, mbaesken
This commit is contained in:
parent
0bc3705948
commit
c82070e635
@ -37,6 +37,11 @@ import jdk.test.lib.process.ProcessTools;
|
||||
public class TestCompileTaskTimeout {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
double timeoutFactor = 1.0;
|
||||
try {
|
||||
timeoutFactor = Double.parseDouble(System.getProperty("test.timeout.factor", "1.0"));
|
||||
} catch (NumberFormatException ignored) {}
|
||||
|
||||
ProcessTools.executeTestJava("-Xcomp", "-XX:CompileTaskTimeout=1", "--version")
|
||||
.shouldHaveExitValue(134)
|
||||
.shouldContain("timed out after");
|
||||
@ -49,7 +54,8 @@ public class TestCompileTaskTimeout {
|
||||
.shouldHaveExitValue(134)
|
||||
.shouldContain("timed out after");
|
||||
|
||||
ProcessTools.executeTestJava("-Xcomp", "-XX:CompileTaskTimeout=2000", "--version")
|
||||
int timeout = (int)(500.0 * timeoutFactor);
|
||||
ProcessTools.executeTestJava("-Xcomp", "-XX:CompileTaskTimeout=" + timeout, "--version")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user