-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
We have some integration test to test integration with camel-quarkus. To detect integration problems early, we would like to also add them to the camel-quarkus-project.
Considerations:
- The
main-branch ofcamel-quarkusis currently in migration to Quarkus 3. There is no alpha-release based on Quarkus 3 yet, so migrating the tests now might be challenging since we cannot build a version based on Quarkus 3 with the camel integration features. - Our integration tests use "only"
camel-jms, but we could additionally add tests forcamel-sjmsandcamel-sjms2.
Discussion:
- We should avoid code duplication as much as possible. This means we want one project to "own" the tests, and another project to use them.
- Who should "own" the tests?
camel-quarkusorquarkus-artemis? - There are several approaches to avoid code duplication. Some are:
-
Integrate the tests from the owner to the user via a git submodule.
- Upside: easy to implement.
- Downsides:
- Submodules are tricky, they have to be manaully updated (since they always target specific commits)
- The user will have a hard time to override dependency versions
- The pipeline has to be modified.
-
Integrate by "mirroring" the test modules from the owner in the user.
- Rough sketch on how to do this:
- For each test module from the owner, create a corresponding test module.
- In the module, create a corresponding class for each Test-class, extend the owner's test class. If necessary, add additional test methods (but this really should not be necessary).
- Upsides:
- Client has maximum flexibility.
- This will "just work" with the current pipeline.
- Downsides:
- initial setup is more complex.
- If the owner adds a new test class, this should also be added to the user, to keep them "in sync".
- Rough sketch on how to do this:
-
Bundle the tests in a specific package in camel and define a small copy script here and just sync now and then by committing changes.
- Upsides:
- No third library to maintain with all the plumbing
- Clear ownership
- New tests get automatically copied
- It will work with current pipeline without any changes
- Downsides:
- Customization in one library is difficult (or even not possible)
- Easy to get the sync broken, since it is just a process
- Changes from the copier need to be merged into the source via a PR first for breaking changes (one could also say that is a benefit)
- Upsides:
-
- Who should "own" the tests?
Reactions are currently unavailable