-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
TestNG Version
7.5 (I see 7.6 was just released but it doesn't appear this behavior will change, see below)
Expected behavior
The result of test timeout allows the developer to identify which line of the test method was executing when the timeout happened
Actual behavior
The InterruptedException thrown by the JVM on the test thread is replaced with a fresh TimeoutException with no reference to the InterruptedException, clobbering all evidence of where the test timed out.
Is the issue reproducible on runner?
- Shell
- Maven
- Gradle
- Ant
- Eclipse
- IntelliJ
- NetBeans
Test case sample
Please, share the test case (as small as possible) which shows the issue
Contribution guidelines
Here's the offending line; I suspect passing the InterruptedException as the cause of the ThreadTimeoutException would be a great solution.
would become
e = new ThreadTimeoutException(tm, realTimeOut, e);
And that ThreadTimeoutException constructor overload would need to be overloaded again to take a cause.