Skip to content

Commit 178a19e

Browse files
author
duke
committed
Backport f8c8bcf4fd31509fdb40d32e8e16ba4fba1f987d
1 parent ab5cf6f commit 178a19e

File tree

1 file changed

+4
-2
lines changed
  • test/hotspot/jtreg/compiler/lib/compile_framework

1 file changed

+4
-2
lines changed

test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
3939
*/
4040
class Compile {
4141
private static final int COMPILE_TIMEOUT = 60;
42+
private static final float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0"));
4243

4344
private static final String JAVA_PATH = JDKToolFinder.getJDKTool("java");
4445
private static final String JAVAC_PATH = JDKToolFinder.getJDKTool("javac");
@@ -178,7 +179,8 @@ private static void executeCompileCommand(List<String> command) {
178179
int exitCode;
179180
try {
180181
Process process = builder.start();
181-
boolean exited = process.waitFor(COMPILE_TIMEOUT, TimeUnit.SECONDS);
182+
long timeout = COMPILE_TIMEOUT * (long)timeoutFactor;
183+
boolean exited = process.waitFor(timeout, TimeUnit.SECONDS);
182184
if (!exited) {
183185
process.destroyForcibly();
184186
System.out.println("Timeout: compile command: " + String.join(" ", command));

0 commit comments

Comments
 (0)