james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [01/20] james-project git commit: JAMES-2470 SpamAssassin can be static in mailet integration tests
Date Fri, 03 Aug 2018 08:52:14 GMT
Repository: james-project
Updated Branches:
  refs/heads/master c3715e708 -> d3f6f1ada


JAMES-2470 SpamAssassin can be static in mailet integration tests

No feedback is tested there hence SPamAssassin container is stateless.

Gain of 30s on that test


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/dffc54e1
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/dffc54e1
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/dffc54e1

Branch: refs/heads/master
Commit: dffc54e10147e7c3469946cfa61095887cbfc52d
Parents: c3715e7
Author: Benoit Tellier <btellier@linagora.com>
Authored: Fri Aug 3 11:29:50 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri Aug 3 11:29:50 2018 +0700

----------------------------------------------------------------------
 .../org/apache/james/transport/mailets/SpamAssassinTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/dffc54e1/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinTest.java
index 1f33b14..ac3887e 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinTest.java
@@ -48,6 +48,7 @@ import org.apache.james.utils.SMTPMessageSender;
 import org.apache.mailet.base.test.FakeMail;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -56,8 +57,8 @@ import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
 public class SpamAssassinTest {
     private static final String SPAM_CONTENT = "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X";
 
-    @Rule
-    public SwarmGenericContainer spamAssassinContainer = new SwarmGenericContainer(Images.SPAMASSASSIN)
+    @ClassRule
+    public static SwarmGenericContainer spamAssassinContainer = new SwarmGenericContainer(Images.SPAMASSASSIN)
         .withExposedPorts(783)
         .withAffinityToContainer()
         .waitingFor(new HostPortWaitStrategy());


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message