allthingssecurity commented on code in PR #28139:
URL: https://github.com/apache/camel/pull/28139#discussion_r4324515706


##########
components/camel-test/camel-test-dst/src/main/docs/test-dst.adoc:
##########
@@ -226,12 +226,24 @@ dst.runFor(dst.between(0, 3L * visibilityTimeout * 1000));
 // faults cleared: the queue must drain
 faults = false;
 sqs.faults = false;
-long deadline = dst.now() + 20L * visibilityTimeout * 1000 + 30_000;
-while (!sqs.allDeleted() && dst.now() < deadline) {
+// drain while it makes progress: stop when no message was deleted for a 
while, or at a cap
+long quiet = 20L * visibilityTimeout * 1000 + 30_000;
+long cap = dst.now() + 3_600_000;
+int left = sqs.notDeleted().size();
+long lastProgress = dst.now();
+while (!sqs.allDeleted() && dst.now() < cap && dst.now() - lastProgress < 
quiet) {
     dst.runFor(100);
+    int now = sqs.notDeleted().size();
+    if (now < left) {
+        left = now;

Review Comment:
   Thanks, done in 726d2adda6f1a27552430ad4d2732dd30ee5147e: the snippet uses 
`remaining` like `SqsWorld`, in `test-dst.adoc` and in the catalog copy 
(byte-identical; `camel-test-dst` built with `package -DskipTests`, no 
generated changes).
   
   _Claude Code on behalf of allthingssecurity_



-- 
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