Dhairya-007 commented on PR #29681: URL: https://github.com/apache/camel/pull/29681#issuecomment-6820319370
Thanks — the leak is real and I had missed it entirely. All four points are in. **Late completion.** Taken as you wrote it: the callback now writes to a local `AtomicReference`, `doStart` publishes to the field only after the wait succeeded, and the timeout path keeps the future and registers `onSuccess(Vertx::close)` on it. Your point about `onSuccess` also firing when the future completed between the `await` and the registration is what makes it airtight — I would have reached for a flag and left that window open. There is a new test for it: the promise is completed *after* `start()` has failed, and the `Vertx` handed over has to come back closed. The instance is a `java.lang.reflect.Proxy` that records `close()`, which avoids stubbing the whole `Vertx` interface for one method. **Upgrade guide.** Added to `camel-4x-upgrade-guide-4_24.adoc` as `=== camel-vertx - the component fails to start when the clustered Vert.x is not created`, covering the start that now fails, raising `timeout` for a slow cluster join (the default is 60, not 10), and the `timeout=0` change. **`timeout <= 0`.** Rejected on the clustered path with `"The timeout option must be a positive number of seconds, was: 0"`. I went with rejecting rather than documenting, since with a bounded `await` a `0` means "fail at once", which is the opposite of what someone setting it intends, and as you say it never produced a usable component anyway. **Nit.** The `DefaultCamelContext` is now created by each test in a try-with-resources and passed into the helper, so it is closed. **JIRA** — I have no credentials for issues.apache.org from this environment, so I cannot create the ticket. If you want a `CAMEL-XXXX` reference, could a committer open it (or give me the number) and I will retitle and amend? -- 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]
