davsclaus commented on PR #30786:
URL: https://github.com/apache/camel/pull/30786#issuecomment-7163549069

   > can you precise from where this log is expected to come from? Should it be 
directly in the console log?
   
   Sorry, my question was not precise. The WARN comes from 
`MongoAbstractConsumerThread.awaitStopped()`, but the module's 
`src/test/resources/log4j2.properties` sends the root logger only to the file 
appender (`target/camel-mongodb-test.log`), and the console appender is 
commented out. That file is not in the Jenkins console log, the Develocity 
console log or the GitHub artifacts, so not finding the WARN there tells us 
nothing either way.
   
   The build you linked answers the question differently, though. It failed in 
`testCustomTailTrackLocation` (`expected: <300> but was: <299>`, 
`MongoDbTailableCursorConsumerIT.java:306`), and that test took **1.124 s** in 
total. The WARN path is only reached after `awaitStopped()` has waited the full 
`shutdownAwaitTermination`, which is 10 s by default and is not changed in this 
IT. So in this run the stop did not leave the thread behind: the thread ended, 
and the `finally` of `doRun()` wrote 299.
   
   That means the mock counted 300 exchanges while the tail position stayed at 
#299, with no thread left behind. So this PR does not change the failure in 
that run. Two leads for the "one behind" (not verified):
   
   - `setLastVal` runs only when `processExchange` returns `true` 
(CAMEL-25024). If the exchange for #300 reached `mock:test` and then ended with 
an exception, the mock counts it but the tail position does not move.
   - `mock:test` is shared by every route of the IT, so a count of 300 does not 
prove that route 3 delivered #300.
   
   To see which one it is, the assert at line 306 could print the body of the 
last exchange the mock received, and whether it failed, and the module could 
log `org.apache.camel.component.mongodb` to the console in this IT, so that a 
failed CI run shows the consumer's log.
   
   _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]

Reply via email to