ACCUMULO-3167 Try to stabilize SplitIT more.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1a578958 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1a578958 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1a578958 Branch: refs/heads/metrics2 Commit: 1a578958d9aca1033460b6636a5c7824ad1742ed Parents: a16b7af Author: Josh Elser <els...@apache.org> Authored: Fri Nov 21 11:54:42 2014 -0500 Committer: Josh Elser <els...@apache.org> Committed: Mon Nov 24 18:08:17 2014 -0500 ---------------------------------------------------------------------- .../org/apache/accumulo/test/functional/SplitIT.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1a578958/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java index 9eab5eb..66d80fa 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java @@ -74,6 +74,10 @@ public class SplitIT extends AccumuloClusterIT { @Before public void alterConfig() throws Exception { + if (ClusterType.MINI == getClusterType()) { + return; + } + InstanceOperations iops = getConnector().instanceOperations(); Map<String,String> config = iops.getSystemConfiguration(); tservMaxMem = config.get(Property.TSERV_MAXMEM.getKey()); @@ -107,6 +111,8 @@ public class SplitIT extends AccumuloClusterIT { log.info("Resetting {}={}", Property.TSERV_MAXMEM.getKey(), tservMaxMem); getConnector().instanceOperations().setProperty(Property.TSERV_MAXMEM.getKey(), tservMaxMem); tservMaxMem = null; + getCluster().getClusterControl().stopAllServers(ServerType.TABLET_SERVER); + getCluster().getClusterControl().startAllServers(ServerType.TABLET_SERVER); } if (null != tservMajcDelay) { log.info("Resetting {}={}", Property.TSERV_MAJC_DELAY.getKey(), tservMajcDelay); @@ -130,7 +136,9 @@ public class SplitIT extends AccumuloClusterIT { vopts.rows = opts.rows; vopts.tableName = table; VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); - UtilWaitThread.sleep(15 * 1000); + while (c.tableOperations().listSplits(table).size() < 10) { + UtilWaitThread.sleep(15 * 1000); + } String id = c.tableOperations().tableIdMap().get(table); Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY); KeyExtent extent = new KeyExtent(new Text(id), null, null); @@ -164,6 +172,11 @@ public class SplitIT extends AccumuloClusterIT { ReadWriteIT.interleaveTest(c, tableName); UtilWaitThread.sleep(5 * 1000); int numSplits = c.tableOperations().listSplits(tableName).size(); + while (numSplits <= 20) { + log.info("Waiting for splits to happen"); + Thread.sleep(2000); + numSplits = c.tableOperations().listSplits(tableName).size(); + } assertTrue("Expected at least 20 splits, saw " + numSplits, numSplits > 20); }