Bug 442932

Summary: JUnit Test Runner should ignore timeouts when debugged
Product: [Eclipse Project] JDT Reporter: Andreas Bogus <bogusandre>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: gautier.desaintmartinlacaze, joshgold
Version: 4.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Andreas Bogus CLA 2014-08-30 03:04:49 EDT
Because I use Infinitest, I want my tests to timeout after a few seconds. I do this by supplying the timeout parameter to the @Test annotation.

However, I have to remove this parameter when I want to debug a test, because otherwise the timeout will terminate the test before I can debug it.

I am not sure how the JUnit test runner is integrated within JDT, but it should be possible to have it ignore timeouts when debugging.

Steps to reproduce:

- Create any test class with at least one line of test code.
- Add a breakpoint on the @Test method
- Add a timeout parameter to your @Test method, e.g. @Test(timeout = 500)
- Debug your test

What should happen:

The test should step into your breakpoint

What happens instead:

The test terminates with a timeout error