Add integration tests for Saga example#489
Merged
jamesnetherton merged 2 commits intoapache:camel-quarkus-mainfrom Mar 31, 2026
Merged
Add integration tests for Saga example#489jamesnetherton merged 2 commits intoapache:camel-quarkus-mainfrom
jamesnetherton merged 2 commits intoapache:camel-quarkus-mainfrom
Conversation
zbendhiba
reviewed
Mar 26, 2026
| }); | ||
|
|
||
| // Give logs a moment to flush (important in native mode) | ||
| Thread.sleep(1000); |
Contributor
There was a problem hiding this comment.
Was there a particular reason that prevents using await() here too
Contributor
Author
There was a problem hiding this comment.
Switched to Awaitility.await.
| } | ||
|
|
||
| // Either outcome is valid - test passes | ||
| assertTrue(hasSuccess || hasFailure, |
Contributor
There was a problem hiding this comment.
Are we certain that if a test failure, it's due to Payment service down? I'm afraid we miss at some point that the saga flow is down. Unless you know this type of failure is definitely coming from paying system. otherwise, maybe we can add a number of retries to the unit test
Contributor
Author
There was a problem hiding this comment.
It's explained in the test class comment:
/**
* Test saga orchestration with LRA - accepts both success and compensation outcomes.
* Payment service has 15% random failure rate, so either scenario is valid.
*/
We probably want to tweak things to make it simpler to test both scenarios.
Contributor
There was a problem hiding this comment.
yeah it's fine for this PR. Maybe we can look at this later
8080dac to
bd2d88f
Compare
bd2d88f to
f169e68
Compare
zbendhiba
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Taken from #486 with some minor tweaks for: