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

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


The following commit(s) were added to refs/heads/main by this push:
     new b98ae941b8 Stabilize Langchain4jIngestFilterIT
b98ae941b8 is described below

commit b98ae941b86f728704a4fcdfc781f7fbcdd7f90b
Author: jiriOndrusek-agent <[email protected]>
AuthorDate: Fri Oct 30 08:07:19 2026 +0000

    Stabilize Langchain4jIngestFilterIT
    
    Wait until the filtered file's key has left the named register, as it is
    only moved out once the exchange ran, possibly behind other files.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../langchain4j/ingest/it/Langchain4jIngestFilterTest.java         | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestFilterTest.java
 
b/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestFilterTest.java
index 16e9145f20..946902c1e0 100644
--- 
a/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestFilterTest.java
+++ 
b/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestFilterTest.java
@@ -27,7 +27,6 @@ import org.awaitility.Awaitility;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -117,10 +116,12 @@ class Langchain4jIngestFilterTest {
 
         Path file = 
Path.of("target/ingest-docs/draft-pumps.txt").toAbsolutePath();
         String key = file + ":" + Files.getLastModifiedTime(file).toMillis() + 
":" + Files.size(file);
+        // the eager register adds the key to the named register when a poll 
picks the file up, and the filtered
+        // outcome moves it out once the exchange ran, which may be behind 
other files of the same poll
         Awaitility.await().atMost(30, TimeUnit.SECONDS).during(3, 
TimeUnit.SECONDS)
                 .pollInterval(100, TimeUnit.MILLISECONDS)
-                .until(() -> 
registerContains("langchain4j-ingest-products-register", key));
-        assertFalse(registerContains("propertiesRegister", key), "the named 
register must not hold the key");
+                .until(() -> 
registerContains("langchain4j-ingest-products-register", key)
+                        && !registerContains("propertiesRegister", key));
     }
 
     private static boolean registerContains(String repo, String key) {

Reply via email to