davsclaus commented on code in PR #27786:
URL: https://github.com/apache/camel/pull/27786#discussion_r4268438125


##########
components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbComponentConnectionReadIT.java:
##########
@@ -70,7 +70,8 @@ public void configure() {
                         .build();
                 context.getRegistry().bind("smbConfig", config);
 
-                fromF("smb:%s/%s?username=%s&password=%s&smbConfig=#smbConfig",
+                // only consume the 100 files seeded by the container (1.txt 
... 100.txt), ignoring files left by other tests
+                
fromF("smb:%s/%s?username=%s&password=%s&smbConfig=#smbConfig&include=^[0-9][0-9]*[.]txt$",

Review Comment:
   The SMB default strategy leaves the files in place, and without `idempotent` 
the next poll (500 ms later) sends the same 100 files again. 
`assertIsSatisfied()` compares the count as soon as 100 arrived, so it can see 
a few from the second poll. `idempotent=true` makes each file count once:
   
   ```suggestion
                   
fromF("smb:%s/%s?username=%s&password=%s&smbConfig=#smbConfig&include=^[0-9][0-9]*[.]txt$&idempotent=true",
   ```



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