Remove assert from the get_rabbit_running_nodes

In the method change_pacemaker_parameter_not_break_rabbitmq,
the timeout for the count_run_rabbit is too short.
That causes sometimes tests to fail with the AssertionError:
No Running rabbitmq nodes found.
+ increase the timeout and the interval
+ remove assert from get_rabbit_running_nodes method

Change-Id: I73fe407078121f8ef4d46120299c86e45c879009
Closes-Bug: #1566324
This commit is contained in:
Marcellin Fom Tchassem 2016-04-06 10:04:19 -05:00 committed by Volodymyr Shypyguzov
parent bc1e37671f
commit 8aae1fc448
3 changed files with 10 additions and 9 deletions

View File

@ -444,10 +444,11 @@ class FuelWebClient29(object):
found_nodes = re.search(
"\{running_nodes,\[([^\]]*)\]\}",
rabbit_status)
assert_is_not_none(
found_nodes,
'No running rabbitmq nodes found on {0}. Status:\n'
'{1}'.format(ctrl_node, rabbit_status))
if not found_nodes:
logger.info(
'No running rabbitmq nodes found on {0}. Status:\n {1}'.format(
ctrl_node, rabbit_status))
return []
rabbit_nodes = found_nodes.group(1).replace("'", "").split(',')
logger.debug('rabbit nodes are {}'.format(rabbit_nodes))
nodes = [node.replace('rabbit@', "") for node in rabbit_nodes]

View File

@ -342,12 +342,12 @@ class TestHaNeutronFailover(TestHaFailoverBase):
2. Change max_rabbitmqctl_timeouts parameter on one of
controllers,after that slaves rabbitmq will be restarted by
Pacemaker.
3. Wait for 1 minute.
3. Wait for 3 minutes.
4. Check RabbitMQ cluster is assembled until success in 10 min
5. Run OSTF
6. Repeat two more times steps 2-5
Duration 50 min
Duration 80 min
"""
super(self.__class__, self). \

View File

@ -1288,7 +1288,7 @@ class TestHaFailoverBase(TestBasic):
logger.info('Command {} was executed on controller'.format(cmd))
logger.info('Check nodes left RabbitMQ cluster')
wait(lambda: count_run_rabbit(rabbit_master), timeout=60,
wait(lambda: count_run_rabbit(rabbit_master), timeout=180,
timeout_msg='All nodes are staying in the cluster')
logger.info('Check parameter was changed')
@ -1305,11 +1305,11 @@ class TestHaFailoverBase(TestBasic):
logger.info('Wait and check nodes back to the RabbitMQ cluster')
wait(lambda: count_run_rabbit(rabbit_master, all_up=True),
timeout=600, interval=20,
timeout=600, interval=120,
timeout_msg='RabbitMQ cluster was not assembled')
for node in rabbit_slaves:
# pylint: disable=undefined-loop-variable
wait(lambda: count_run_rabbit(node, all_up=True), timeout=60,
wait(lambda: count_run_rabbit(node, all_up=True), timeout=180,
interval=10,
timeout_msg='Some nodes did not back to the cluster after'
'10 minutes wait.')