This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 795c55eea49e CAMEL-24727: camel-jbang - ExportApiTest ignores the 
thread of Awaitility when it checks for leaked threads (#28726)
795c55eea49e is described below

commit 795c55eea49e7c635fcfd252903e043130cb8740
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Oct 30 10:35:09 2026 +0100

    CAMEL-24727: camel-jbang - ExportApiTest ignores the thread of Awaitility 
when it checks for leaked threads (#28726)
    
    Signed-off-by: Claus Ibsen <[email protected]>
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../java/org/apache/camel/dsl/jbang/core/commands/ExportApiTest.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportApiTest.java
 
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportApiTest.java
index a2b7e4140914..130c42e9a7c5 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportApiTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportApiTest.java
@@ -107,7 +107,10 @@ class ExportApiTest {
             System.gc();
             assertThat(contexts).allSatisfy(ref -> 
assertThat(ref.get()).isNull());
         });
-        assertThat(Thread.getAllStackTraces().keySet()).allSatisfy(t -> 
assertThat(threads).contains(t));
+        // except the thread of Awaitility itself, which can still be stopping 
after the await above
+        assertThat(Thread.getAllStackTraces().keySet())
+                .filteredOn(t -> !t.getName().startsWith("awaitility"))
+                .allSatisfy(t -> assertThat(threads).contains(t));
     }
 
     private ExportRequest request(int i) {

Reply via email to