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
This commit is contained in:
Amrith Kumar 2016-09-10 12:33:42 -04:00
parent 5b53ac27b2
commit 7d8d743d8e
3 changed files with 23 additions and 4 deletions

View File

@ -0,0 +1 @@
BUG_EJECT_VALID_MASTER = 1622014

View File

@ -15,7 +15,9 @@
from trove.common import utils
from trove.tests.scenario.helpers.test_helper import DataType
from trove.tests.scenario import runners
from trove.tests.scenario.runners.test_runners import CheckInstance
from trove.tests.scenario.runners.test_runners import SkipKnownBug
from trove.tests.scenario.runners.test_runners import TestRunner
from troveclient.compat import exceptions
@ -230,10 +232,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):

View File

@ -15,6 +15,7 @@
import datetime
import os
import proboscis
import time as timer
from oslo_config.cfg import NoSuchOptError
@ -41,6 +42,19 @@ TEST_HELPER_MODULE_NAME = 'test_helper'
TEST_HELPER_BASE_NAME = 'TestHelper'
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 RunnerFactory(object):
_test_runner = None