citrusframework / citrusframework/citrus
Async container does not show the original error in case of test failure
- Dominant language
- Java
- Stars
- 485
- Forks
- 155
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 6
Description
**User story**
As a citrus test programmer, I want the async container to forward the root cause of a test failure, so that I'm able to investigate the issue straight forward without removing the async container from the test for debugging purposes.
**Additional context**
We had a test case where a jms message was not received correctly because of a missing message selector. The async container failed with the following stack trace without showing the root cause.
```
com.consol.citrus.exceptions.TestCaseFailedException: Failed to wait for test container to finish properly
at com.consol.citrus.TestCase.finish(TestCase.java:280)
at com.consol.citrus.dsl.runner.DefaultTestRunner.stop(DefaultTestRunner.java:152)
at com.consol.citrus.dsl.testng.TestNGCitrusTest.invokeTestMethod(TestNGCitrusTest.java:133)
at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:110)
at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:56)
at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:242)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:567)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:707)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:979)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.runSuites(TestNG.java:1028)
at org.testng.TestNG.run(TestNG.java:996)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
Caused by: com.consol.citrus.exceptions.CitrusRuntimeException: Failed to wait for test container to finish properly
at com.consol.citrus.util.TestUtils.waitForCompletion(TestUtils.java:101)
at com.consol.citrus.util.TestUtils.waitForCompletion(TestUtils.java:74)
at com.consol.citrus.TestCase.finish(TestCase.java:248)
... 24 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at com.consol.citrus.util.TestUtils.waitForCompletion(TestUtils.java:99)
... 26 more
```
BR,
Sven
Contributor guide
Assessment
This issue has not been assessed yet.