Test an infinite loop?

Wang Weijun weijun.wang at oracle.com
Tue Sep 30 06:44:53 UTC 2014


I'd like to write a jtreg test that confirms an infinite loop is fixed. That is to say, before the fix there was an infinite loop and now there is none. I tried to add a @run main/timeout=2 action and run the test with an old JDK and it still runs for 3 minutes showing

Timeout signalled after 2 seconds
Test not responding after 100 interrupts
Test not responding after 200 interrupts
Test not responding after 300 interrupts
Test not responding after 400 interrupts
Test not responding after 500 interrupts
Timeout signalled after 62 seconds
Test not responding after 100 interrupts
Test not responding after 200 interrupts
Test not responding after 300 interrupts
Test not responding after 400 interrupts
Test not responding after 500 interrupts
elapsed time (seconds): 180.008

Why isn't it killed at 2 seconds?

Thanks
Max



More information about the jtreg-use mailing list