From a3803b48d167ddd2b74518e18f48228dcf0003eb Mon Sep 17 00:00:00 2001 From: Vladyslav Drok Date: Tue, 13 Dec 2016 17:02:21 +0200 Subject: [PATCH] Use polling in set_console_mode tempest test set_consolde_mode is an asynchronous operation, so we need to use polling to avoid races between set_console_mode and get_console. Closes-Bug: #1649344 Change-Id: Iedf3148d6324cc3d552234f46060d28603386044 --- ironic_tempest_plugin/tests/api/admin/test_nodes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ironic_tempest_plugin/tests/api/admin/test_nodes.py b/ironic_tempest_plugin/tests/api/admin/test_nodes.py index e4a8eea02a..fe95c02574 100644 --- a/ironic_tempest_plugin/tests/api/admin/test_nodes.py +++ b/ironic_tempest_plugin/tests/api/admin/test_nodes.py @@ -157,9 +157,8 @@ class TestNodes(base.BaseBaremetalTest): @test.idempotent_id('80504575-9b21-4670-92d1-143b948f9437') def test_set_console_mode(self): self.client.set_console_mode(self.node['uuid'], True) - - _, body = self.client.get_console(self.node['uuid']) - self.assertEqual(True, body['console_enabled']) + waiters.wait_for_bm_node_status(self.client, self.node['uuid'], + 'console_enabled', True) @test.idempotent_id('b02a4f38-5e8b-44b2-aed2-a69a36ecfd69') def test_get_node_by_instance_uuid(self):