davsclaus commented on code in PR #31073:
URL: https://github.com/apache/camel/pull/31073#discussion_r4732599869
##########
core/camel-core/src/test/java/org/apache/camel/impl/DefaultEndpointRegistryTest.java:
##########
@@ -184,30 +186,44 @@ public void testConcurrency() throws InterruptedException
{
int nThreads = 4;
ExecutorService executorService =
Executors.newFixedThreadPool(nThreads);
int iterations = 500;
+ AtomicReference<Throwable> failure = new AtomicReference<>();
Review Comment:
Agreed it is correct as is: the first captured failure ends the test before
the next iteration starts, so a stale value cannot leak into a later one.
Leaving it outside the loop is fine.
_Claude Code on behalf of davsclaus_
--
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]