james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [17/24] james-project git commit: JAMES-2366 Fix HBase RRT tests
Date Tue, 03 Apr 2018 10:03:03 GMT
JAMES-2366 Fix HBase RRT tests

 - Do not rely on MoreObjects as it generates a Guava's version conflict in HBase tests
 - Clear HBase content after each 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/66596d60
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/66596d60
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/66596d60

Branch: refs/heads/master
Commit: 66596d6075b318ca2c3cb72bdc09de2502278b93
Parents: 6be6b35
Author: benwa <btellier@linagora.com>
Authored: Fri Mar 30 10:32:20 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Apr 3 17:00:14 2018 +0700

----------------------------------------------------------------------
 .../apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java | 6 ++++++
 .../src/main/java/org/apache/james/rrt/lib/MappingsImpl.java   | 5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/66596d60/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
----------------------------------------------------------------------
diff --git a/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
b/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
index c41f666..d425db9 100644
--- a/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
+++ b/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
@@ -19,10 +19,13 @@
 package org.apache.james.rrt.hbase;
 
 import org.apache.commons.configuration.DefaultConfigurationBuilder;
+import org.apache.james.domainlist.hbase.def.HDomainList;
 import org.apache.james.mailbox.hbase.HBaseClusterSingleton;
+import org.apache.james.rrt.hbase.def.HRecipientRewriteTable;
 import org.apache.james.rrt.lib.AbstractRecipientRewriteTable;
 import org.apache.james.rrt.lib.AbstractRecipientRewriteTableTest;
 import org.apache.james.system.hbase.TablePool;
+import org.apache.james.user.hbase.def.HUsersRepository;
 import org.junit.After;
 import org.junit.Before;
 
@@ -45,6 +48,9 @@ public class HBaseRecipientRewriteTableTest extends AbstractRecipientRewriteTabl
     @Override
     @After
     public void tearDown() throws Exception {
+        cluster.clearTable(new String(HDomainList.TABLE_NAME));
+        cluster.clearTable(new String(HRecipientRewriteTable.TABLE_NAME));
+        cluster.clearTable(new String(HUsersRepository.TABLE_NAME));
         super.tearDown();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/66596d60/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
----------------------------------------------------------------------
diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
index a315d7e..73949f6 100644
--- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
+++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
@@ -33,7 +33,6 @@ import org.apache.james.rrt.lib.Mapping.Type;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Joiner;
-import com.google.common.base.MoreObjects;
 import com.google.common.base.Objects;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
@@ -232,6 +231,8 @@ public class MappingsImpl implements Mappings, Serializable {
 
     @Override
     public String toString() {
-        return MoreObjects.toStringHelper(getClass()).add("mappings", mappings).toString();
+        return "MappingsImpl{" +
+            "mappings=" + mappings +
+            '}';
     }
 }
\ No newline at end of file


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