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

gnodet 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 9e8815cdbec9 CAMEL-23247: Fix flaky MailContentTypeResolverTest
9e8815cdbec9 is described below

commit 9e8815cdbec9bae154925e0bf5f089d576ae5479
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed May 6 06:57:02 2026 +0200

    CAMEL-23247: Fix flaky MailContentTypeResolverTest
    
    Convert the MimeMultipart body to String in the route (via convertBodyTo) 
to avoid a race
    between the test assertion thread and the POP3 consumer closing the mail 
folder.
---
 .../org/apache/camel/component/mail/MailContentTypeResolverTest.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailContentTypeResolverTest.java
 
b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailContentTypeResolverTest.java
index e72d76d12790..8f82f06b8d2a 100644
--- 
a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailContentTypeResolverTest.java
+++ 
b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailContentTypeResolverTest.java
@@ -99,7 +99,9 @@ public class MailContentTypeResolverTest extends 
CamelTestSupport {
                     }
                 });
 
-                from(james.uriPrefix(Protocol.pop3) + 
"&initialDelay=100&delay=100").to("mock:result");
+                from(james.uriPrefix(Protocol.pop3) + 
"&initialDelay=100&delay=100")
+                        .convertBodyTo(String.class)
+                        .to("mock:result");
             }
         };
     }

Reply via email to