summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmrith Kumar <amrith@tesora.com>2016-09-10 12:33:42 -0400
committerAmrith Kumar <amrith@tesora.com>2016-09-11 08:01:59 -0400
commitc9b3c49cf1994fa2d728a99793ac6b82888de2ae (patch)
treecf7cc3487c8a8914ad58bbcbb97638d832b38654
parent85e26361aa7b547ecf31f4a23d214e0c9058709c (diff)
downloadtrove-c9b3c49cf1994fa2d728a99793ac6b82888de2ae.tar.gz
Skip 'eject valid master' replication test
There is a test to eject a valid master during replication that is failing more and more often in the scenario tests. Basically the eject will only work if the heartbeat from the current master is more than a minute old. This shouldn't happen in the scenario test run, but it does - quite often. Since this is consuming a large amount of gate resources, and the bug isn't that onerous (but is probably hard to fix), the current 'eject valid master' test will be turned off until the fix lands. The scenario test will print out the bug number during each run as a reminder (using the new SkipKnownBug method). Co-Authored-By: Peter Stachowski <peter@tesora.com> Co-Authored-By: Amrith Kumar <amrith@tesora.com> Author: Peter Stachowski <peter@tesora.com> Change-Id: Ia543da551ad4394d4964541f9db474e0792b9337 Related-Bug: #1622014 (cherry picked from commit 7d8d743d8e168f64fa893c975d7301507d4985d8) Conflicts: trove/tests/scenario/runners/replication_runners.py trove/tests/scenario/runners/test_runners.py
-rw-r--r--trove/tests/scenario/runners/__init__.py1
-rw-r--r--trove/tests/scenario/runners/replication_runners.py12
-rw-r--r--trove/tests/scenario/runners/test_runners.py14
3 files changed, 23 insertions, 4 deletions
diff --git a/trove/tests/scenario/runners/__init__.py b/trove/tests/scenario/runners/__init__.py
index e69de29b..7c1af8c5 100644
--- a/trove/tests/scenario/runners/__init__.py
+++ b/trove/tests/scenario/runners/__init__.py
@@ -0,0 +1 @@
+BUG_EJECT_VALID_MASTER = 1622014
diff --git a/trove/tests/scenario/runners/replication_runners.py b/trove/tests/scenario/runners/replication_runners.py
index 01cc52ea..e2428339 100644
--- a/trove/tests/scenario/runners/replication_runners.py
+++ b/trove/tests/scenario/runners/replication_runners.py
@@ -16,6 +16,8 @@
from trove.common import utils
from trove.tests.api.instances import CheckInstance
from trove.tests.scenario.helpers.test_helper import DataType
+from trove.tests.scenario import runners
+from trove.tests.scenario.runners.test_runners import SkipKnownBug
from trove.tests.scenario.runners.test_runners import TestRunner
from troveclient.compat import exceptions
@@ -135,10 +137,12 @@ class ReplicationRunner(TestRunner):
def run_eject_valid_master(self, expected_exception=exceptions.BadRequest,
expected_http_code=400):
- self.assert_raises(
- expected_exception, expected_http_code,
- self.auth_client.instances.eject_replica_source,
- self.instance_info.id)
+ # self.assert_raises(
+ # expected_exception, expected_http_code,
+ # self.auth_client.instances.eject_replica_source,
+ # self.instance_info.id)
+ # Uncomment once BUG_EJECT_VALID_MASTER is fixed
+ raise SkipKnownBug(runners.BUG_EJECT_VALID_MASTER)
def run_delete_valid_master(self, expected_exception=exceptions.Forbidden,
expected_http_code=403):
diff --git a/trove/tests/scenario/runners/test_runners.py b/trove/tests/scenario/runners/test_runners.py
index 51038a67..2ca2a2cd 100644
--- a/trove/tests/scenario/runners/test_runners.py
+++ b/trove/tests/scenario/runners/test_runners.py
@@ -14,6 +14,7 @@
# under the License.
import os
+import proboscis
import time as timer
from proboscis import asserts
@@ -32,6 +33,19 @@ from trove.tests.util.users import Requirements
CONF = cfg.CONF
+class SkipKnownBug(proboscis.SkipTest):
+ """Skip test failures due to known bug(s).
+ These should get fixed sometime in the future.
+ """
+
+ def __init__(self, *bugs):
+ """
+ :param bugs: One or more bug references (e.g. link, bug #).
+ """
+ bug_ref = '; '.join(map(str, bugs))
+ super(SkipKnownBug, self).__init__("Known bug: %s" % bug_ref)
+
+
class TestRunner(object):
"""