Repository navigation
CAMEL-26761: camel-chaos - keep chaos scenarios in test/chaos, which camel run already leaves alone - #29456
Conversation
…camel run already leaves alone Scenarios were in chaos/<name>.chaos. camel run --dev --source-dir reloads from the source dir recursively, except test/**, so a scenario saved there (and the feed messages and reports of CAMEL-26760) landed in a watched folder. test/ is already the folder camel run leaves alone, with the Citrus tests. - The TUI saves a scenario as test/chaos/<name>.chaos, and the AI test of a rule writes test/chaos/<id>-test.chaos. - camel run test/ still sees a folder of only Citrus tests when it has a chaos subfolder (RunFiles.citrusTestsOnly). - Docs, help texts and examples use test/chaos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔁 1 test passed only after a retry on JDK 21 (1 retried attempt) Recovered flaky tests on JDK 21 (1)
🔬 Scalpel shadow comparison — Scalpel: 691 of 718 tested, 24 compile-only — current: 72 all testedMaveniverse Scalpel detected 691 affected modules (current approach: 72). Skip-tests mode would test 691 modules (8 direct + 686 downstream), skip tests for 24 (generated code, meta-modules)
|
| Module | Duration | Status |
|---|---|---|
| Camel :: JBang :: Plugin :: TUI | 57.1s | SUCCESS |
| Camel :: Main | 37.1s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 23.0s | SUCCESS |
| Camel :: JBang :: Run | 16.1s | SUCCESS |
| Camel :: Docs | 14.5s | SUCCESS |
| Camel :: Chaos | n/a | |
| Camel :: JBang :: Core | n/a |
Top 20 slowest modules:
Camel :: JBang :: Plugin :: TUI(57.1s)Camel :: Main(37.1s)Camel :: Catalog :: Camel Catalog(23.0s)Camel :: JBang :: Run(16.1s)Camel :: Docs(14.5s)
oscerd
left a comment
There was a problem hiding this comment.
Makes sense, and the reasoning is the right one: test/** is already the tree the camel run --dev --source-dir reloader excludes (sourceDirReloadPattern = *,!test/**), so moving scenarios under test/chaos reuses that exclusion instead of inventing a new ignore rule, and it keeps a feed message written as .yaml/.xml from being picked up as a route. Treating a scenario as a test that lives in test/ alongside the Citrus tests is consistent, and since camel export already copies only the Citrus tests out of test/, scenarios stay out of an exported project exactly as before.
The relocation looks complete and consistent: the TUI save path (ChaosScenarioFile), the chaos-load example, the loadScenario javadoc sample, the camel.chaos.scenario property description, the design doc and the jbang command docs all now say test/chaos/outage.chaos, and the generated main/jbang metadata and the cli-help.txt golden are regenerated to match, which is why the reactor stays green. Agreed that 4.24 being unreleased means no upgrade-guide entry is needed.
LGTM.
Claude Code on behalf of oscerd
What
CAMEL-26761: chaos scenarios move from
chaos/<name>.chaostotest/chaos/<name>.chaos.Why
test/is already the folder the Camel CLI leaves alone, andchaos/was not:camel run --dev --source-dirreloads from the source dir recursively with the pattern*,!test/**(RunPipeline.sourceDirReloadPattern). A scenario saved withsin the TUI landed in a watched folder. With CAMEL-26760 ("let there be chaos"), an agent also writes the feed messages of a scenario (test/chaos/<name>/001.json, ...) and reports there, and a feed message in.yamlor.xmlcould be read as a route.test/, and a scenario is a test too: a CI gate with the verdict as the exit code.camel exportcopies only the Citrus tests fromtest/, so scenarios stay out of an exported project, as before.4.24 is not released, so no upgrade guide entry.
Changes
sofferstest/chaos/<name>.chaos(ChaosScenarioFile), and the AI test of a rule (t) writestest/chaos/<id>-test.chaos(ChaosAiPrompt).RunFiles.citrusTestsOnlyignores achaossubfolder, socamel run test/still says it holds only Citrus tests whentest/chaos/is there.test/chaos, and the chaos doc says why. Regenerated:main.adoc, the main and jbang commands metadata, the jbang command pages, the catalog copies, and the goldencli-help.txt(thechaos-loadfooter rewrapped).ChaosConfigurationPropertiesTestandSecurityUtilsTest(any path does), andclasspath:chaos/outage.chaos(a classpath resource of a Maven test).The chaos example (apache/camel-jbang-examples#134) and the blog draft (apache/camel-website#1852) are updated to match.
Tests
RunFilesTest.aFolderOfOnlyCitrusTests: atest/chaosfolder with a scenario and its feed does not count.ChaosControlTest,ChaosAiPromptTest,RunTest.RunFilesTest+ProjectRunnerTest(40), camel-jbang-coreCliHelpGoldenTest+RunTest+CamelChaos*Test, TUIChaos*Test.Claude Code on behalf of Claus Ibsen