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

Intermittent failure of DynamicCallResourceTest.testConcurrentDynamicCalls #3628

Closed
tkobayas opened this issue Aug 21, 2024 · 3 comments · Fixed by #3632
Closed

Intermittent failure of DynamicCallResourceTest.testConcurrentDynamicCalls #3628

tkobayas opened this issue Aug 21, 2024 · 3 comments · Fixed by #3632
Assignees

Comments

@tkobayas
Copy link
Contributor

tkobayas commented Aug 21, 2024

Describe the bug

DynamicCallResourceTest.testConcurrentDynamicCalls fails intermittently.

https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly/job/kogito-runtimes.build-and-deploy/75/
https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly/job/kogito-runtimes.build-and-deploy/77/

[2024-08-20T03:18:17.225Z] [ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 28.01 s <<< FAILURE! -- in org.kie.kogito.process.dynamic.DynamicCallResourceTest
[2024-08-20T03:18:17.225Z] [ERROR] org.kie.kogito.process.dynamic.DynamicCallResourceTest.testConcurrentDynamicCalls -- Time elapsed: 4.325 s <<< ERROR!
[2024-08-20T03:18:17.225Z] java.util.concurrent.ExecutionException:
[2024-08-20T03:18:17.225Z] java.lang.AssertionError: 1 expectation failed.
[2024-08-20T03:18:17.225Z] Expected status code <200> but was <400>.
[2024-08-20T03:18:17.225Z]
[2024-08-20T03:18:17.225Z]      at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
[2024-08-20T03:18:17.225Z]      at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
[2024-08-20T03:18:17.225Z]      at org.kie.kogito.process.dynamic.DynamicCallResourceTest.testConcurrentDynamicCalls(DynamicCallResourceTest.java:168)
[2024-08-20T03:18:17.225Z]      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2024-08-20T03:18:17.225Z]      at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:1013)
[2024-08-20T03:18:17.225Z]      at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:827)
[2024-08-20T03:18:17.225Z]      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[2024-08-20T03:18:17.225Z]      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Expected behavior

Test passes constantly.

Actual behavior

Test fails intermittently. we can confirm it in nightly build as above. Locally, I see it fails once in 4 or 5 times testing.

How to Reproduce?

mvn clean install -Dquickly
cd quarkus/addons/dynamic/integration-tests
mvn test -Dtest=DynamicCallResourceTest

Locally, I see it fails once in 4 or 5 times testing.

Output of uname -a or ver

Linux tkobayas-thinkpadt14sgen1.tokyo.csb 6.10.4-100.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Aug 11 15:56:38 UTC 2024 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment (Red_Hat-17.0.12.0.7-2) (build 17.0.12+7) OpenJDK 64-Bit Server VM (Red_Hat-17.0.12.0.7-2) (build 17.0.12+7, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

main branch

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

No response

@tkobayas
Copy link
Contributor Author

Probably @gmunozfe @fjtirado can have a look?

@fjtirado fjtirado self-assigned this Aug 22, 2024
@fjtirado
Copy link
Contributor

@tkobayas
Curioulsy, in my local I get a 500 rather than a 400. In the case of the 500, the issue is that ServiceLoader is not thread safe

In the case of 400 I guess the issue is related with Instance.stream being called concurrently, but I was not able to reproduce locally.

Ill avoid using stream() over them anyay.

@tkobayas
Copy link
Contributor Author

@fjtirado Thank you!

rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this issue Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎯 Done
Development

Successfully merging a pull request may close this issue.

2 participants