-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Steps to reproduce:
- Create new gradle project using testng, a sample test which uses a helper that throws an exception
- Use a testng.xml suite file to enable parallel execution
- Run tests
Expected result:
Tests finish running
Actual result:
Tests never finish running
Toward the end of running tests, I get this stack trace:
Exception in thread "TestNG-test-TestNGDemo-1" java.lang.NullPointerException: Cannot invoke "org.testng.thread.IWorker.getTasks()" because "worker" is null
at org.testng.internal.thread.graph.GraphOrchestrator.setStatus(GraphOrchestrator.java:116)
at org.testng.internal.thread.graph.GraphOrchestrator.afterExecute(GraphOrchestrator.java:75)
at org.testng.internal.thread.graph.TestNGFutureTask.done(TestNGFutureTask.java:34)
at java.base/java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:434)
at java.base/java.util.concurrent.FutureTask.setException(FutureTask.java:303)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:322)
at org.testng.internal.thread.graph.TestNGFutureTask.run(TestNGFutureTask.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Even more frustratingly, the stack trace that indicates the helper failed is often logged way before the NullPointerException.
Using latest 7.11.0
I've attached a sample project that demonstrates the issue.
Metadata
Metadata
Assignees
Labels
No labels