You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/10/09 07:20:17 UTC

[PR] CAMEL-25191: Fix flaky test MainNotAutoConfiguredWarningTest [camel]

gnodet opened a new pull request, #27603:
URL: https://github.com/apache/camel/pull/27603

   ## Summary
   
   Fixes [CAMEL-25191](https://issues.apache.org/jira/browse/CAMEL-25191) — flaky test `MainNotAutoConfiguredWarningTest`.
   
   ## Root Cause
   
   `MainNotAutoConfiguredWarningTest` installs a custom WARN appender on the `BaseMainSupport` Log4j logger in `@BeforeEach`/`@AfterEach`, mutating global `LoggerContext` state. Under JUnit parallel execution, `AiObservabilityConfigurationPropertiesTest` concurrently emits WARN logs for unconsumed `camel.aiObservability.enable` properties (loaded from `ai-observability-unknown.properties`). These logs leak into the test appender and cause assertion failures (17% rate normally, 78% with `-T1C`).
   
   ## Fix
   
   Add `@Isolated` to prevent concurrent test execution while the `LoggerContext` is modified. This is consistent with the existing pattern used by `MainPropertyPlaceholderTest`, `MainEnvVarComponentConfigTest`, `MainPropertyPlaceholderWithEnvTest`, `MainPropertyPlaceholderWithSystemTest`, and `MainBootstrapEdgeCasesTest` in the same module.
   
   Also drop `public` modifiers from class and method declarations per JUnit 5 / AGENTS.md conventions.
   
   ## Testing
   
   `mvn test -pl core/camel-main -am -Dtest=MainNotAutoConfiguredWarningTest` — 2/2 tests pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25191: Fix flaky test MainNotAutoConfiguredWarningTest [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27603:
URL: https://github.com/apache/camel/pull/27603#issuecomment-6076576149

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `core/camel-main`
   
   > :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 1 of 704 tested, 0 compile-only — current: 66 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **1 affected modules** (current approach: 66).
   
   **Skip-tests mode would test 1 modules** (1 direct + 0 downstream), **skip tests for 0** (generated code, meta-modules)
   
   <details><summary>Modules only in current approach (65)</summary>
   
   - `camel-a2a`
   - `camel-as2`
   - `camel-clickup`
   - `camel-consul`
   - `camel-core-all`
   - `camel-csv`
   - `camel-fhir`
   - `camel-groovy`
   - `camel-hazelcast`
   - `camel-hl7`
   - `camel-ibm-watsonx-ai`
   - `camel-iso8583`
   - `camel-java-joor-dsl`
   - `camel-jbang-mcp`
   - `camel-jbang-plugin-mcp`
   - `camel-jbang-plugin-route-parser`
   - `camel-jbang-plugin-tui`
   - `camel-jbang-plugin-validate`
   - `camel-jetty`
   - `camel-jsonpath`
   - `camel-kamelet`
   - `camel-kamelet-main-support`
   - `camel-knative-http`
   - `camel-launcher-container`
   - `camel-mail`
   - `camel-mail-microsoft-oauth`
   - `camel-maven-plugin`
   - `camel-mcp-server`
   - `camel-micrometer-prometheus`
   - `camel-microprofile-health`
   - `camel-netty`
   - `camel-netty-http`
   - `camel-oauth`
   - `camel-observability-services`
   - `camel-once`
   - `camel-openai`
   - `camel-openapi-validator`
   - `camel-platform-http-main`
   - `camel-platform-http-vertx`
   - `camel-plc4x`
   - `camel-pubnub`
   - `camel-quickfix`
   - `camel-rest-openapi`
   - `camel-restdsl-openapi-plugin`
   - `camel-salesforce`
   - `camel-salesforce-codegen`
   - `camel-semantic`
   - `camel-spring-main`
   - `camel-state-store`
   - `camel-syslog`
   - `camel-telegram`
   - `camel-test-main-junit5`
   - `camel-test-main-junit6`
   - `camel-typesafe-ai`
   - `camel-vertx-websocket`
   - `camel-webhook`
   - `camel-whatsapp`
   - `camel-wolf-defender`
   - `camel-xml-io-dsl`
   - `camel-xml-jaxb-dsl`
   - `camel-xml-jaxb-dsl-test-definition`
   - `camel-xml-jaxb-dsl-test-spring`
   - `camel-yaml-dsl-validator`
   - `camel-yaml-dsl-validator-maven-plugin`
   - `camel-zookeeper`
   
   </details>
   
   
   <details><summary>Modules Scalpel would test (1)</summary>
   
   - `camel-main` ← core/camel-main/src/test/java/org/apache/camel/main/MainNotAutoConfiguredWarningTest.java
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37898433739)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25191: Fix flaky test MainNotAutoConfiguredWarningTest [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #27603:
URL: https://github.com/apache/camel/pull/27603


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25191: Fix flaky test MainNotAutoConfiguredWarningTest [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27603:
URL: https://github.com/apache/camel/pull/27603#issuecomment-6076372652

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org