diff options
author | Peter Stachowski <peter@tesora.com> | 2016-10-14 15:43:38 -0400 |
---|---|---|
committer | Peter Stachowski <peter@tesora.com> | 2016-10-14 15:43:38 -0400 |
commit | e01f1004b5aeee3876f27dfb4a97ba00d5c7832a (patch) | |
tree | fef71e64a80feeb8912fd74426629f75c6fb0827 | |
parent | 4bedc8b6e0fd462a7811baa7efcc9f9a0cb5859b (diff) | |
download | trove-e01f1004b5aeee3876f27dfb4a97ba00d5c7832a.tar.gz |
PostgreSQL guest_log test fails intermittently
When testing the user log for PostgreSQL, it occasionally fails due
to the fact that its heartbeat actually performs a select on the
underlying database. This can sometimes cause new lines to be written
to the log file while the file is being published. This will return a
state of 'Partial' instead of 'Published.'
Both these states are now valid for this test.
See:
http://logs.openstack.org/98/356698/3/check/
gate-trove-scenario-functional-dsvm-postgresql-nv/
d45bf5a/console.html#_2016-10-12_00_01_21_419989
This fix should make the gate more stable as it is proposed that
PostgreSQL be made voting.
Change-Id: I32b182148073d8a0bcd2792cdc730ab684c3e760
Closes-Bug: #1633603
-rw-r--r-- | trove/tests/scenario/runners/guest_log_runners.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/trove/tests/scenario/runners/guest_log_runners.py b/trove/tests/scenario/runners/guest_log_runners.py index fb47dae0..93f7e9c1 100644 --- a/trove/tests/scenario/runners/guest_log_runners.py +++ b/trove/tests/scenario/runners/guest_log_runners.py @@ -129,8 +129,11 @@ class GuestLogRunner(TestRunner): self.assert_equal(expected_type, log_details.type, "Wrong log type for '%s' log" % expected_log_name) current_status = log_details.status.replace(' ', '_') - self.assert_equal(expected_status, current_status, - "Wrong log status for '%s' log" % expected_log_name) + if not isinstance(expected_status, list): + expected_status = [expected_status] + self.assert_is_sublist([current_status], expected_status, + "Wrong log status for '%s' log" % + expected_log_name) if expected_published is None: pass elif expected_published == 0: @@ -654,9 +657,10 @@ class GuestLogRunner(TestRunner): self.assert_log_publish( self.auth_client, log_name, - expected_status=guest_log.LogStatus.Published.name, + expected_status=[guest_log.LogStatus.Published.name, + guest_log.LogStatus.Partial.name], expected_published=self._get_last_log_published(log_name) + 1, - expected_pending=0) + expected_pending=None) def run_test_log_disable_user_after_stop_start(self): expected_status = guest_log.LogStatus.Disabled.name |