gnodet opened a new pull request, #26182: URL: https://github.com/apache/camel/pull/26182
## Problem `MasterQuartzEndpointIT` is flaky because it asserts `expectedMinimumMessageCount(2)` with only the default 10-second wait time. The startup chain (ZooKeeper container → Curator connection (3s timeout) → master election → quartz scheduler init → first cron fire) can easily exceed 10 seconds under CI load, causing the test to fail intermittently. The sibling test `MasterEndpointIT` already handles this correctly by waiting for master election with Awaitility before proceeding. ## Fix - **Wait for master election**: Added `Awaitility.await()` to wait until `masterConsumer.isMaster() && masterConsumer.isConnected()` before setting mock expectations, consistent with `MasterEndpointIT`. - **Increase `resultWaitTime`**: Set to 30 seconds (from default 10s) to give enough time for ≥2 quartz cron fires (every 2 seconds) after election completes. - **Add route id**: Added `id="zookeeper-master-quartz"` to the XML route definition for clean consumer access (previously the route had no id). ## Testing - `MasterQuartzEndpointIT` passes consistently. - `MasterEndpointIT` (sibling test) still passes — no regressions. _AI agent (Hermes on behalf of gnodet)_ -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
