JDK-8366776 : Timeout on ExpSwitchNestingTest.java
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-09-03
  • Updated: 2025-10-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
I found this timeout after integration of  "JDK-8260555 Change the default TIMEOUT_FACTOR from 4 to 1" 

I will not just make the test have longer timeout as I do not understand /why/ it times out. All junit tests succeed according to the log. And much faster than 120 seconds.


----------System.err:(21/1376)----------
STARTED    ExpSwitchNestingTest::testEswitch 'testEswitch()'
SUCCESSFUL ExpSwitchNestingTest::testEswitch 'testEswitch()' [11130ms]
STARTED    ExpSwitchNestingTest::testBreakExpressionLabelDisambiguation 'testBreakExpressionLabelDisambiguation()'
SUCCESSFUL ExpSwitchNestingTest::testBreakExpressionLabelDisambiguation 'testBreakExpressionLabelDisambiguation()' [127ms]
STARTED    ExpSwitchNestingTest::testFunReturningSwitchExp 'testFunReturningSwitchExp()'
SUCCESSFUL ExpSwitchNestingTest::testFunReturningSwitchExp 'testFunReturningSwitchExp()' [23ms]
STARTED    ExpSwitchNestingTest::testNestedInExpSwitch 'testNestedInExpSwitch()'
SUCCESSFUL ExpSwitchNestingTest::testNestedInExpSwitch 'testNestedInExpSwitch()' [520ms]
STARTED    ExpSwitchNestingTest::testContinueLoops 'testContinueLoops()'
SUCCESSFUL ExpSwitchNestingTest::testContinueLoops 'testContinueLoops()' [91ms]
STARTED    ExpSwitchNestingTest::testReallySimpleCases 'testReallySimpleCases()'
SUCCESSFUL ExpSwitchNestingTest::testReallySimpleCases 'testReallySimpleCases()' [255ms]
STARTED    ExpSwitchNestingTest::testLambda 'testLambda()'
SUCCESSFUL ExpSwitchNestingTest::testLambda 'testLambda()' [380ms]

[ JUnit Containers: found 4, started 4, succeeded 4, failed 0, aborted 0, skipped 0]
[ JUnit Tests: found 7, started 7, succeeded 7, failed 0, aborted 0, skipped 0]


JavaTest Message: Test complete.

result: Error. "junit" action timed out with a timeout of 120 seconds on agent 16


test result: Error. "junit" action timed out with a timeout of 120 seconds on agent 16
Comments
It is unclear if this is a test infrastructure problem, or a test problem. After JDK-8369491, the timeout factor should be back to 4, which should reduce the pressure. This is combined with many more similar timeouts, I believe, the investigation will continue.
22-10-2025

One of many cases of tests passing and then timing out in the test harness.
04-09-2025

Not a simple setup: - class ExpSwitchNestingTest extends CompilationTestCase - class CompilationTestCase extends JavacTemplateTestBase - @ExtendWith(ComboWatcher.class) public abstract class JavacTemplateTestBase - class ComboWatcher implements TestWatcher, AfterAllCallback And a lot of file handles involved. Yet, I cannot reproduce it locally.
03-09-2025