You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2026/07/12 07:34:43 UTC
(camel) branch main updated: CAMEL-24013: Fix flaky RawMailMessageTest (#24616)
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 9076b83a0924 CAMEL-24013: Fix flaky RawMailMessageTest (#24616)
9076b83a0924 is described below
commit 9076b83a0924765dfc8ba5bc43f58f607c9dbe81
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Sun Jul 12 09:34:36 2026 +0200
CAMEL-24013: Fix flaky RawMailMessageTest (#24616)
CAMEL-24013: Fix flaky RawMailMessageTest
Fix wrong mailbox user (jonesImap -> jonesRawImap) in raw IMAP route causing
two routes to race on the same mailbox with delete=true. Remove premature
Mailbox.clearAll() that could wipe messages before other routes consumed them.
Co-authored-by: Claude Opus 4.6 <no...@anthropic.com>
---
.../test/java/org/apache/camel/component/mail/RawMailMessageTest.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
index 2745d6a8c3ed..4bcbc6192f84 100644
--- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
+++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
@@ -69,8 +69,6 @@ public class RawMailMessageTest extends CamelTestSupport {
@Test
public void testGetRawJavaMailMessage() throws Exception {
- Mailbox.clearAll();
-
Map<String, Object> map = new HashMap<>();
map.put("To", davsclaus.getEmail());
map.put("From", "jstrachan@apache.org");
@@ -188,7 +186,7 @@ public class RawMailMessageTest extends CamelTestSupport {
+ "&closeFolder=false&initialDelay=100&delay=100&delete=true&mapMailMessage=false")
.to("mock://rawMessagePop3");
- from(jonesImap.uriPrefix(Protocol.imap)
+ from(jonesRawImap.uriPrefix(Protocol.imap)
+ "&closeFolder=false&initialDelay=100&delay=100&delete=true&mapMailMessage=false")
.to("mock://rawMessageImap");