You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2015/03/26 18:28:37 UTC
accumulo git commit: ACCUMULO-3699 tweak tests to be more reliable
Repository: accumulo
Updated Branches:
refs/heads/master b96e0a762 -> e384db9cf
ACCUMULO-3699 tweak tests to be more reliable
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e384db9c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e384db9c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e384db9c
Branch: refs/heads/master
Commit: e384db9cf008d781a1c9d0ea806c2f8a10e9ec4e
Parents: b96e0a7
Author: Eric Newton <er...@gmail.com>
Authored: Thu Mar 26 13:28:22 2015 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Thu Mar 26 13:28:22 2015 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/tserver/TabletServer.java | 2 +-
.../java/org/apache/accumulo/proxy/SimpleProxyBase.java | 3 +++
.../org/apache/accumulo/test/AssignmentThreadsIT.java | 10 ++++++++--
.../apache/accumulo/test/replication/ReplicationIT.java | 2 ++
4 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e384db9c/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 662ee31..8c4dcf8 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -1381,7 +1381,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
private void checkPermission(TCredentials credentials, String lock, final String request) throws ThriftSecurityException {
boolean fatal = false;
try {
- log.debug("Got " + request + " message from user: " + credentials.getPrincipal());
+ log.trace("Got " + request + " message from user: " + credentials.getPrincipal());
if (!security.canPerformSystemActions(credentials)) {
log.warn("Got " + request + " message from user: " + credentials.getPrincipal());
throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e384db9c/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
index 0f3dea0..4c3f55c 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
@@ -972,6 +972,8 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
+ // zookeeper propagation time
+ UtilWaitThread.sleep(5 * 1000);
WriterOptions writerOptions = new WriterOptions();
writerOptions.setLatencyMs(10000);
@@ -1025,6 +1027,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
assertEquals(2, client.listConstraints(creds, TABLE_TEST).size());
+ // zookeeper propagation time
UtilWaitThread.sleep(5 * 1000);
client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "123"));
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e384db9c/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java b/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java
index ccf234d..fd7ea6c 100644
--- a/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java
@@ -61,24 +61,30 @@ public class AssignmentThreadsIT extends ConfigurableMacIT {
// make a table with a lot of splits
String tableName = getUniqueNames(1)[0];
Connector c = getConnector();
+ log.info("Creating table");
c.tableOperations().create(tableName);
SortedSet<Text> splits = new TreeSet<Text>();
- for (int i = 0; i < 4000; i++) {
+ for (int i = 0; i < 1000; i++) {
splits.add(new Text(randomHex(8)));
}
+ log.info("Adding splits");
c.tableOperations().addSplits(tableName, splits);
+ log.info("Taking table offline");
c.tableOperations().offline(tableName, true);
// time how long it takes to load
+ log.info("Bringing the table online");
long now = System.currentTimeMillis();
c.tableOperations().online(tableName, true);
long diff = System.currentTimeMillis() - now;
- log.debug("Loaded " + splits.size() + " tablets in " + diff + " ms");
+ log.info("Loaded " + splits.size() + " tablets in " + diff + " ms");
c.instanceOperations().setProperty(Property.TSERV_ASSIGNMENT_MAXCONCURRENT.getKey(), "20");
now = System.currentTimeMillis();
+ log.info("Taking table offline, again");
c.tableOperations().offline(tableName, true);
// wait >10 seconds for thread pool to update
UtilWaitThread.sleep(Math.max(0, now + 11 * 1000 - System.currentTimeMillis()));
now = System.currentTimeMillis();
+ log.info("Bringing table back online");
c.tableOperations().online(tableName, true);
long diff2 = System.currentTimeMillis() - now;
log.debug("Loaded " + splits.size() + " tablets in " + diff2 + " ms");
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e384db9c/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
index 54348db..f0821e1 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -1096,6 +1096,7 @@ public class ReplicationIT extends ConfigurableMacIT {
}
bw.close();
+ conn.tableOperations().flush(table1, null, null, true);
String tableId = conn.tableOperations().tableIdMap().get(table1);
Assert.assertNotNull("Table ID was null", tableId);
@@ -1407,6 +1408,7 @@ public class ReplicationIT extends ConfigurableMacIT {
}
bw.close();
+ conn.tableOperations().flush(table1, null, null, true);
// Make sure the replication table exists at this point
boolean online = ReplicationTable.isOnline(conn);