Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parallel testing in MicroProfile TCK and timing-based tests failures #207

Open
lprimak opened this issue Mar 23, 2021 · 5 comments

Comments

@lprimak
Copy link

lprimak commented Mar 23, 2021

MP-TCK has many tests and runs very slowly.
Arquillian 1.7.0.Alpha9 and higher now supports parallel testing with TestNG and JUnit 4/5
MicroProfile TCK has timing-related issues in general, and in particular makes it impossible to run using
parallel testing and pass.

TCK should be fixed to be able to run in parallel, and thus able to speed up runs

@lprimak
Copy link
Author

lprimak commented Mar 23, 2021

@Emily-Jiang I can help with this work as well

@lprimak
Copy link
Author

lprimak commented Mar 23, 2021

BTW since MP-TCK hardcodes test names and they may conflict during parallel testing,
I enhanced Payara Arquillian connectors to append a sequence number to deployed applications on the server so they don't conflict.

@lprimak
Copy link
Author

lprimak commented Mar 23, 2021

Example run for FT 3.0:

[INFO] --- maven-failsafe-plugin:3.0.0-M5:integration-test (default) @ tck-runner ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
...
... TestNG 7.4.0 by Cédric Beust ([email protected])
...

Loaded timeout-multiplier from system property: 1.0
Mar 23, 2021 2:38:33 PM fish.payara.arquillian.container.payara.CommonPayaraManager <clinit>
INFO: Serializing Deployments and Undeployments (fish.payara.arquillian.deployLock)

===============================================
microprofile-FT-TCK
Total tests run: 420, Passes: 415, Failures: 5, Skips: 0
===============================================

[ERROR] Tests run: 420, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 247.267 s <<< FAILURE! - in TestSuite
[ERROR] org.eclipse.microprofile.fault.tolerance.tck.metrics.TimeoutMetricTest.testTimeoutMetric  Time elapsed: 0.83 s  <<< FAILURE!
org.eclipse.microprofile.faulttolerance.exceptions.TimeoutException
	at org.eclipse.microprofile.fault.tolerance.tck.metrics.TimeoutMetricTest.testTimeoutMetric(TimeoutMetricTest.java:82)

[ERROR] org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.testRetryChainSuccess  Time elapsed: 0.983 s  <<< FAILURE!
java.lang.AssertionError: Unexpected exceptionjava.util.concurrent.TimeoutException
	at org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.assertCompleteOk(RetryConditionTest.java:423)
	at org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.testRetryChainSuccess(RetryConditionTest.java:357)

[ERROR] org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.testRetryParallelSuccess  Time elapsed: 1.039 s  <<< FAILURE!
java.lang.AssertionError: Unexpected exceptionjava.util.concurrent.TimeoutException
	at org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.assertCompleteOk(RetryConditionTest.java:423)
	at org.eclipse.microprofile.fault.tolerance.tck.RetryConditionTest.testRetryParallelSuccess(RetryConditionTest.java:387)

[ERROR] org.eclipse.microprofile.fault.tolerance.tck.CircuitBreakerRetryTest.testRetriesSucceedWhenCircuitClosesAsync  Time elapsed: 0.902 s  <<< FAILURE!
java.lang.AssertionError: 
Call was successful but did not take the expected time
Expected: Duration within <PT0.25S> of <PT1S>
     but: <PT1.776497908S> which is <PT0.776497908S> from <PT1S>
	at org.eclipse.microprofile.fault.tolerance.tck.CircuitBreakerRetryTest.testRetriesSucceedWhenCircuitClosesAsync(CircuitBreakerRetryTest.java:538)

[ERROR] org.eclipse.microprofile.fault.tolerance.tck.TimeoutTest.testGTDefaultNoTimeout  Time elapsed: 0.942 s  <<< FAILURE!
java.lang.AssertionError: serviceB should throw a RuntimeException in testGTDefaultNoTimeout not a TimeoutException
	at org.eclipse.microprofile.fault.tolerance.tck.TimeoutTest.testGTDefaultNoTimeout(TimeoutTest.java:136)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   CircuitBreakerRetryTest>Arquillian.run:138->testRetriesSucceedWhenCircuitClosesAsync:538 Call was successful but did not take the expected time
Expected: Duration within <PT0.25S> of <PT1S>
     but: <PT1.776497908S> which is <PT0.776497908S> from <PT1S>
[ERROR]   RetryConditionTest>Arquillian.run:138->testRetryChainSuccess:357->assertCompleteOk:423 Unexpected exceptionjava.util.concurrent.TimeoutException
[ERROR]   RetryConditionTest>Arquillian.run:138->testRetryParallelSuccess:387->assertCompleteOk:423 Unexpected exceptionjava.util.concurrent.TimeoutException
[ERROR]   TimeoutTest>Arquillian.run:138->testGTDefaultNoTimeout:136 serviceB should throw a RuntimeException in testGTDefaultNoTimeout not a TimeoutException
[ERROR]   TimeoutMetricTest>Arquillian.run:138->testTimeoutMetric:82 » Timeout
[INFO] 
[ERROR] Tests run: 420, Failures: 5, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:3.0.0-M5:verify (verify) @ tck-runner ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:13 min
[INFO] Finished at: 2021-03-23T14:42:38-05:00
[INFO] ------------------------------------------------------------------------

@Emily-Jiang
Copy link
Member

@lprimak thanks for bringing this up! Please feel free to raise an issue and propose a PR. ou can start with MicroProfile Fault Tolerance if you like.

@lprimak
Copy link
Author

lprimak commented Mar 23, 2021

Unfortunately, currently I am very far from having time to raise a PR for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants