Skip to content

CAMEL-22527: Fix flaky HttpRouteTest and JettyFailoverRoundRobinTest#22982

Open
gnodet wants to merge 2 commits intoapache:mainfrom
gnodet:CAMEL-22527-fix-flaky-jetty-tests
Open

CAMEL-22527: Fix flaky HttpRouteTest and JettyFailoverRoundRobinTest#22982
gnodet wants to merge 2 commits intoapache:mainfrom
gnodet:CAMEL-22527-fix-flaky-jetty-tests

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 6, 2026

CAMEL-22527

Fixes two flaky tests in camel-jetty:

HttpRouteTest.testEchoEndpoint

The enableSessionSupport method in JettyHttpComponent threw IllegalStateException when session support was requested on a Jetty server that was already started (e.g., when another route on the same port was connected first). Instead of throwing, the fix restarts the server to add session support — matching the existing pattern for handler changes. The JettySessionSupportTest is updated to verify the new behavior: session support now works correctly even when added to a port that already has other routes.

JettyFailoverRoundRobinTest.testJettyFailoverRoundRobin

The test assumed the failover round-robin load balancer always starts at index 0, but the starting index can vary depending on the AtomicInteger counter state. The fix verifies that both good endpoints are reached across two requests (confirming both failover and round-robin behavior) without assuming a specific starting index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gnodet gnodet requested review from davsclaus and oscerd May 6, 2026 05:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gnodet gnodet marked this pull request as draft May 6, 2026 06:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🧪 CI tested the following changed modules:

  • components/camel-jetty-common
  • components/camel-jetty

ℹ️ 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.

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • components/camel-jetty: 3 test(s) disabled on GitHub Actions
Build reactor — dependencies compiled but only changed modules were tested (2 modules)
  • Camel :: Jetty
  • Camel :: Jetty :: Common

⚙️ View full build and test results

@gnodet gnodet marked this pull request as ready for review May 6, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants