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 2013/10/22 20:54:57 UTC

[1/2] git commit: ACCUMULO-1789 Add timeout scaling factor to tests

Updated Branches:
  refs/heads/master b90710296 -> aceb5fbea


ACCUMULO-1789 Add timeout scaling factor to tests

Slower hardware or VMs may have trouble completing tests within the timeouts
specified. This change adds a -f option to run.py to add a scaling factor
to the maxRuntime for tests, the timeout for Accumulo to shut down, and to
a specific timeout in SimpleBalancerFairness.

Signed-off-by: Eric Newton <er...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0fe0a5a5
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0fe0a5a5
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0fe0a5a5

Branch: refs/heads/master
Commit: 0fe0a5a5b72da02bd2e07bc8c87e808c0c9653dc
Parents: 3143b9c
Author: Bill Havanki <bh...@cloudera.com>
Authored: Tue Oct 22 12:32:07 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Oct 22 14:51:30 2013 -0400

----------------------------------------------------------------------
 test/system/auto/JavaTest.py              | 1 +
 test/system/auto/TestUtils.py             | 3 ++-
 test/system/auto/run.py                   | 3 +++
 test/system/auto/simple/simpleBalancer.py | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0fe0a5a5/test/system/auto/JavaTest.py
----------------------------------------------------------------------
diff --git a/test/system/auto/JavaTest.py b/test/system/auto/JavaTest.py
index 25c0c2a..cca32c6 100755
--- a/test/system/auto/JavaTest.py
+++ b/test/system/auto/JavaTest.py
@@ -41,6 +41,7 @@ class JavaTest(TestUtilsMixin, unittest.TestCase):
         self.settings = TestUtilsMixin.settings.copy()
         self.settings.update(eval(out))
         TestUtilsMixin.setUp(self);
+        self.maxRuntime = self.timeout_factor * self.maxRuntime
 
         handle = self.runJTest(self.masterHost(),'setup')
         out,err = handle.communicate()

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0fe0a5a5/test/system/auto/TestUtils.py
----------------------------------------------------------------------
diff --git a/test/system/auto/TestUtils.py b/test/system/auto/TestUtils.py
index e9b79b8..c70baf1 100755
--- a/test/system/auto/TestUtils.py
+++ b/test/system/auto/TestUtils.py
@@ -394,7 +394,7 @@ class TestUtilsMixin:
         handle = self.runOn(self.masterHost(),
                  [self.accumulo_sh(), 'admin', '-u', ROOT,
                  '-p', ROOT_PASSWORD, 'stopAll'])
-        self.waitForStop(handle, seconds)
+        self.waitForStop(handle, self.timeout_factor * seconds)
         self.stop_monitor(self.masterHost())
         self.cleanupAccumuloHandles()
         # give everyone a couple seconds to completely stop
@@ -424,6 +424,7 @@ class TestUtilsMixin:
 
     def setUp(self):
         self.hosts = self.options.hosts
+        self.timeout_factor = self.options.timeout_factor
         self.clean_accumulo(self.masterHost())
         self.setup_logging()
         self.start_accumulo()

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0fe0a5a5/test/system/auto/run.py
----------------------------------------------------------------------
diff --git a/test/system/auto/run.py b/test/system/auto/run.py
index 11fabf2..3ff3465 100755
--- a/test/system/auto/run.py
+++ b/test/system/auto/run.py
@@ -244,6 +244,9 @@ def main():
                       help='Start the test list at the given test name')
     parser.add_option('-x', '--xml', dest='xmlreport', default=False, action='store_true',
                       help='Output tests results to xml (jenkins conpatible)')
+    parser.add_option('-f', '--timeout-factor', dest='timeout_factor',
+                      default=1, type=int,
+                      help="Multiplier for some timeouts (use on slower hardware) (%default)")
     
     allTests = getTests()
     options = parseArguments(parser, allTests)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0fe0a5a5/test/system/auto/simple/simpleBalancer.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/simpleBalancer.py b/test/system/auto/simple/simpleBalancer.py
index 7b57d2a..d6c82bd 100755
--- a/test/system/auto/simple/simpleBalancer.py
+++ b/test/system/auto/simple/simpleBalancer.py
@@ -71,7 +71,7 @@ class SimpleBalancerFairness(SunnyDayTest):
         self.ingester = self.ingest(self.masterHost(),
                                     200000,
                                     size=self.options.size)
-        self.waitForStop(self.ingester, 120)
+        self.waitForStop(self.ingester, self.timeout_factor * 120)
         self.shell(self.masterHost(), 'flush -t test_ingest')
         self.waitForStop(self.verify(self.masterHost(), self.options.rows), 60)
 


[2/2] git commit: Merge remote-tracking branch 'origin/1.5.1-SNAPSHOT'

Posted by ec...@apache.org.
Merge remote-tracking branch 'origin/1.5.1-SNAPSHOT'

Conflicts:
	test/system/auto/simple/simpleBalancer.py


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/aceb5fbe
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/aceb5fbe
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/aceb5fbe

Branch: refs/heads/master
Commit: aceb5fbea811fbcc8c346329de0b4173772544e3
Parents: b907102 0fe0a5a
Author: Eric Newton <er...@gmail.com>
Authored: Tue Oct 22 14:55:15 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Oct 22 14:55:15 2013 -0400

----------------------------------------------------------------------
 test/system/auto/JavaTest.py  | 1 +
 test/system/auto/TestUtils.py | 3 ++-
 test/system/auto/run.py       | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------