You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/09/26 19:18:34 UTC
[2/3] git commit: ACCUMULO-3175 Include scaling factor in sleep
statement
ACCUMULO-3175 Include scaling factor in sleep statement
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b9a0b27e
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b9a0b27e
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b9a0b27e
Branch: refs/heads/master
Commit: b9a0b27eff5bf522ab150a2e83d39f78da32496b
Parents: b43abcb
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 26 13:17:41 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 26 13:17:41 2014 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/test/Accumulo3047IT.java | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/b9a0b27e/test/src/test/java/org/apache/accumulo/test/Accumulo3047IT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/Accumulo3047IT.java b/test/src/test/java/org/apache/accumulo/test/Accumulo3047IT.java
index a333901..6066bf3 100644
--- a/test/src/test/java/org/apache/accumulo/test/Accumulo3047IT.java
+++ b/test/src/test/java/org/apache/accumulo/test/Accumulo3047IT.java
@@ -34,6 +34,7 @@ import org.apache.accumulo.test.functional.ConfigurableMacIT;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
public class Accumulo3047IT extends ConfigurableMacIT {
@@ -50,6 +51,19 @@ public class Accumulo3047IT extends ConfigurableMacIT {
cfg.setProperty(Property.GC_CYCLE_START, "0s");
}
+ private int timeoutFactor = 1;
+
+ @Before
+ public void setup() {
+ try {
+ timeoutFactor = Integer.parseInt(System.getProperty("timeout.factor"));
+ } catch (NumberFormatException e) {
+ log.warn("Could not parse integer from timeout.factor");
+ }
+
+ Assert.assertTrue("timeout.factor must be greater than or equal to 1", timeoutFactor >= 1);
+ }
+
@Test
public void test() throws Exception {
// make a table
@@ -67,7 +81,7 @@ public class Accumulo3047IT extends ConfigurableMacIT {
// get rid of the table
c.tableOperations().delete(tableName);
// let gc run
- UtilWaitThread.sleep(5 * 1000);
+ UtilWaitThread.sleep(timeoutFactor * 5 * 1000);
// look for delete markers
Scanner scanner = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
scanner.setRange(MetadataSchema.DeletesSection.getRange());