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

apupier 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 9db0fc50aa68 CAMEL-23317 - clean test setup RawMailMessageTest
9db0fc50aa68 is described below

commit 9db0fc50aa6852226cd60817bb52de5bb67529ab
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Wed Jun 10 15:40:21 2026 +0200

    CAMEL-23317 - clean test setup RawMailMessageTest
    
    Low chances that it is affecting the flakiness of the test but it will
    be cleaner anyway.
    * remove override of deprecated doSetup()
    * separate setupResources() and cleanResources() to fill MailBox and
    clear it
    
    Signed-off-by: AurĂ©lien Pupier <[email protected]>
---
 .../java/org/apache/camel/component/mail/RawMailMessageTest.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 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 a6a6fbbe671f..2c6ba3870062 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
@@ -51,14 +51,18 @@ public class RawMailMessageTest extends CamelTestSupport {
     private static final MailboxUser davsclaus = 
Mailbox.getOrCreateUser("davsclaus", "secret");
 
     @Override
-    public void doPreSetup() throws Exception {
-        Mailbox.clearAll();
+    protected void setupResources() throws Exception {
         prepareMailbox(jonesPop3);
         prepareMailbox(jonesRawPop3);
         prepareMailbox(jonesImap);
         prepareMailbox(jonesRawImap);
     }
 
+    @Override
+    protected void cleanupResources() throws Exception {
+        Mailbox.clearAll();
+    }
+
     @Test
     public void testGetRawJavaMailMessage() throws Exception {
         Mailbox.clearAll();

Reply via email to