gnodet opened a new pull request, #24410: URL: https://github.com/apache/camel/pull/24410
## Summary _Claude Code on behalf of Guillaume Nodet_ Fixes https://issues.apache.org/jira/browse/CAMEL-23896 The `SqlFunctionDataSourceTest` fails intermittently in CI because the embedded MariaDB4j database has a hardcoded 30s startup timeout (`dbStartMaxWaitInMS`) that is too short when CI machines are under load. Observed in [PR #24374 CI run](https://github.com/apache/camel/actions/runs/28641667625) on JDK 17. **Root cause analysis:** 1. **Timeout too short**: MariaDB4j waits for the "ready for connections" magic string in console output, with a default 30s deadline. On loaded CI machines, InnoDB initialization (buffer pool, undo tablespaces, temp files) can exceed this. The CI log showed MariaDB was progressing normally but hadn't finished within 30s. 2. **Broken retry logic**: When `start()` threw, `sharedMariaDb` was already assigned (set before `start()` in the original code), so surefire retries skipped `initSharedMariaDb()` and failed with "DataSource must be configured" — a cascading failure from the first timeout. **Fixes applied:** - Increase the MariaDB startup timeout from 30s to 120s via reflection on the `protected` `dbStartMaxWaitInMS` field (MariaDB4j provides no public API for this) - Move `sharedMariaDb` assignment to after `start()` succeeds, so retries properly re-attempt initialization ## Test plan - [x] `SqlFunctionDataSourceTest` passes (2 tests) - [x] All 233 camel-sql unit tests pass (`mvn test`) - [x] Code formatting verified (`mvn formatter:format impsort:sort` — no changes needed) - [ ] CI passes on JDK 17 and JDK 25 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
