Fix test_instance_action functional test failure

Fix an intermittent failure of
test_list_instance_action_with_changes_before method
of the TestInstanceActionCLIV266 class.

Change-Id: Ie898d9590e1701476eadf4895bce7874d989175a
Closes-Bug: #1795392
This commit is contained in:
Takashi NATSUME 2018-10-02 09:45:06 +09:00
parent 25ced5b95c
commit 98b088286d
1 changed files with 3 additions and 4 deletions

View File

@ -161,12 +161,11 @@ class TestInstanceActionCLIV266(TestInstanceActionCLIV258,
expect_event_hostId_field = True
def test_list_instance_action_with_changes_before(self):
# Ignore microseconds to make this a deterministic test.
server = self._create_server()
end_create = timeutils.utcnow().replace(microsecond=0).isoformat()
time.sleep(2)
end_create = timeutils.utcnow().isoformat()
server.stop()
end_stop = timeutils.utcnow().replace(microsecond=0).isoformat()
self._wait_for_state_change(server.id, 'shutoff')
end_stop = timeutils.utcnow().isoformat()
stop_output = self.nova(
"instance-action-list %s --changes-before %s" %