You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2014/11/07 23:31:22 UTC
[07/10] accumulo git commit: ACCUMULO-3147 Fix replication test bug
ACCUMULO-3147 Fix replication test bug
Test was trying to talk to ZooKeeper for MockInstance
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5753e168
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5753e168
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5753e168
Branch: refs/heads/master
Commit: 5753e16839cf149110372bd95e26e92208d6c266
Parents: fa717c9
Author: Christopher Tubbs <ct...@apache.org>
Authored: Fri Nov 7 13:03:08 2014 -0500
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Fri Nov 7 13:03:08 2014 -0500
----------------------------------------------------------------------
.../org/apache/accumulo/core/replication/ReplicationTable.java | 3 ++-
.../accumulo/master/replication/FinishedWorkUpdaterTest.java | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/5753e168/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
index b6d343f..ec7c202 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
@@ -31,6 +31,7 @@ import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.TableOfflineException;
import org.apache.accumulo.core.client.impl.Namespaces;
import org.apache.accumulo.core.client.impl.Tables;
+import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.master.state.tables.TableState;
import org.apache.accumulo.core.replication.ReplicationSchema.StatusSection;
import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
@@ -84,7 +85,7 @@ public class ReplicationTable {
}
public static boolean isOnline(Connector conn) {
- return TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
+ return conn.getInstance() instanceof MockInstance || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
}
public static void setOnline(Connector conn) throws AccumuloSecurityException, AccumuloException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/5753e168/server/master/src/test/java/org/apache/accumulo/master/replication/FinishedWorkUpdaterTest.java
----------------------------------------------------------------------
diff --git a/server/master/src/test/java/org/apache/accumulo/master/replication/FinishedWorkUpdaterTest.java b/server/master/src/test/java/org/apache/accumulo/master/replication/FinishedWorkUpdaterTest.java
index 7e8f762..ae84472 100644
--- a/server/master/src/test/java/org/apache/accumulo/master/replication/FinishedWorkUpdaterTest.java
+++ b/server/master/src/test/java/org/apache/accumulo/master/replication/FinishedWorkUpdaterTest.java
@@ -61,7 +61,7 @@ public class FinishedWorkUpdaterTest {
}
@Test
- public void noReplicationTableFailsGracefully() {
+ public void offlineReplicationTableFailsGracefully() {
updater.run();
}