Re: [PR] CAMEL-19526: replaced the Thread.sleep with the best option or removed it. [camel]
rafamqrs commented on code in PR #11945: URL: https://github.com/apache/camel/pull/11945#discussion_r1388640552 ## components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/JmsReconnectManualTest.java: ## @@ -102,7 +105,9 @@ public void configure() { * Wait long enough for the jms client to do a full reconnect. In the Tibco EMS case this means that a Temporary * Destination created before is invalid now */ -Thread.sleep(5000); +Awaitility.await() +.pollDelay(Duration.ofMillis(5000)) +.until(() -> true); Review Comment: Makes Sense, thank you! -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-19526: replaced the Thread.sleep with the best option or removed it. [camel]
rafamqrs commented on PR #11945: URL: https://github.com/apache/camel/pull/11945#issuecomment-1804769570 > Thanks for your contribution! > > There are few places where I think it would be better to retain the `Thread.sleep` because the proposed solution with Awaitility makes the code harder to read (and, also, the adequate solution would be to refactor the tests so that we can use adequate synchronization mechanisms - but that's beyond the point of this change). > > Also, one more note about the commit message. Please make sure to write the commit message according to our standards. Trying doing something like this: > > ``` > CAMEL-19526: replaced the thread.sleep with the best option or removed > ``` My bad, I ended up forgetting to write the Jira task on the commit message and keep the commit message according to the standards. -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-19526: replaced the Thread.sleep with the best option or removed it. [camel]
orpiske merged PR #11945: URL: https://github.com/apache/camel/pull/11945 -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org