Bug 442932 - JUnit Test Runner should ignore timeouts when debugged
Summary: JUnit Test Runner should ignore timeouts when debugged
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-30 03:04 EDT by Andreas Bogus CLA
Modified: 2018-01-25 15:06 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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