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 acb5e191f30 Slow test on other platforms
acb5e191f30 is described below

commit acb5e191f30315f66c8cf7e6969482c589049130
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Jun 10 08:00:31 2025 +0200

    Slow test on other platforms
---
 .../component/smb/SmbConsumerPartialReadNoPathIT.java      | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbConsumerPartialReadNoPathIT.java
 
b/components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbConsumerPartialReadNoPathIT.java
index 5e32c4f72f7..154707ce54f 100644
--- 
a/components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbConsumerPartialReadNoPathIT.java
+++ 
b/components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbConsumerPartialReadNoPathIT.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.smb;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
+import org.apache.camel.builder.NotifyBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.support.DefaultUuidGenerator;
@@ -26,6 +27,7 @@ import org.junit.jupiter.api.Test;
 
 import static org.awaitility.Awaitility.await;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class SmbConsumerPartialReadNoPathIT extends SmbServerTestSupport {
 
@@ -44,15 +46,21 @@ public class SmbConsumerPartialReadNoPathIT extends 
SmbServerTestSupport {
 
     @Test
     public void testSmbSimpleConsumeNoPath() throws Exception {
+        NotifyBuilder nb = new NotifyBuilder(context).whenDone(1).create();
+
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello Uuid");
         mock.expectedHeaderReceived(Exchange.FILE_NAME, uuid);
 
         MockEndpoint.assertIsSatisfied(context);
 
-        await().atMost(10, TimeUnit.SECONDS)
-                .untilAsserted(() -> assertEquals("Hello Uuid",
-                        new 
String(copyFileContentFromContainer("/data/rw/failed/" + uuid))));
+        assertTrue(nb.matchesWaitTime());
+
+        await().atMost(5, TimeUnit.SECONDS)
+                .untilAsserted(() -> {
+                    byte[] arr = 
copyFileContentFromContainer("/data/rw/failed/" + uuid);
+                    assertEquals("Hello Uuid", new String(arr));
+                });
     }
 
     @Override

Reply via email to