Merge "Fullstack: Wait placement process fixtrue to really stop" into stable/yoga
This commit is contained in:
commit
43f8e592c2
|
@ -95,6 +95,10 @@ class AsyncProcess(object):
|
|||
def cmd(self):
|
||||
return ' '.join(self._cmd)
|
||||
|
||||
@property
|
||||
def is_running(self):
|
||||
return self._is_running
|
||||
|
||||
def _reset_queues(self):
|
||||
self._stdout_lines = eventlet.queue.LightQueue()
|
||||
self._stderr_lines = eventlet.queue.LightQueue()
|
||||
|
|
|
@ -98,6 +98,12 @@ class ProcessFixture(fixtures.Fixture):
|
|||
else:
|
||||
return executor.submit(_restart)
|
||||
|
||||
def process_is_running(self):
|
||||
return self.process.is_running
|
||||
|
||||
def process_is_not_running(self):
|
||||
return not self.process_is_running()
|
||||
|
||||
|
||||
class RabbitmqEnvironmentFixture(fixtures.Fixture):
|
||||
|
||||
|
|
|
@ -237,6 +237,14 @@ class TestPlacementBandwidthReport(base.BaseFullStackTestCase):
|
|||
sleep=1)
|
||||
|
||||
self.environment.placement.process_fixture.stop()
|
||||
|
||||
placement_fixture = self.environment.placement.process_fixture
|
||||
utils.wait_until_true(
|
||||
predicate=functools.partial(
|
||||
placement_fixture.process_is_not_running),
|
||||
timeout=report_interval, sleep=1
|
||||
)
|
||||
|
||||
_add_new_bridge_and_restart_agent(self.environment.hosts[0])
|
||||
|
||||
check_agent_not_synced = functools.partial(
|
||||
|
|
Loading…
Reference in New Issue