You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2016/11/01 19:51:00 UTC
[06/50] hbase git commit: HBASE-15108 TestReplicationAdmin failed on
branch-1.0
HBASE-15108 TestReplicationAdmin failed on branch-1.0
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ae8f0900
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ae8f0900
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ae8f0900
Branch: refs/heads/branch-1.0
Commit: ae8f0900fb49b222c8359256022035841b3eb53d
Parents: 9277293
Author: chenheng <ch...@apache.org>
Authored: Fri Jan 15 09:49:37 2016 +0800
Committer: chenheng <ch...@apache.org>
Committed: Fri Jan 15 09:49:37 2016 +0800
----------------------------------------------------------------------
.../client/replication/TestReplicationAdmin.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/ae8f0900/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
index 1a5dd33..d4cebd8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
@@ -175,14 +175,28 @@ public class TestReplicationAdmin {
// append table t2 to replication
admin.appendPeerTableCFs(ID_ONE, "t2");
- assertEquals("t2;t1", admin.getPeerTableCFs(ID_ONE));
+ String peerTablesOne = admin.getPeerTableCFs(ID_ONE);
+
+ // Different jdk's return different sort order for the tables. ( Not sure on why exactly )
+ //
+ // So instead of asserting that the string is exactly we
+ // assert that the string contains all tables and the needed separator.
+ assertTrue("Should contain t1", peerTablesOne.contains("t1"));
+ assertTrue("Should contain t2", peerTablesOne.contains("t2"));
+ assertTrue("Should contain ; as the seperator", peerTablesOne.contains(";"));
// append table column family: f1 of t3 to replication
admin.appendPeerTableCFs(ID_ONE, "t3:f1");
- assertEquals("t3:f1;t2;t1", admin.getPeerTableCFs(ID_ONE));
+ String peerTablesTwo = admin.getPeerTableCFs(ID_ONE);
+ assertTrue("Should contain t1", peerTablesTwo.contains("t1"));
+ assertTrue("Should contain t2", peerTablesTwo.contains("t2"));
+ assertTrue("Should contain t3:f1", peerTablesTwo.contains("t3:f1"));
+ assertTrue("Should contain ; as the seperator", peerTablesTwo.contains(";"));
admin.removePeer(ID_ONE);
+
}
+
@Test
public void testRemovePeerTableCFs() throws Exception {
// Add a valid peer