Merge "Add aditional waiter for TF case" into mcp/epoxy
diff --git a/octavia_tempest_plugin/tests/api/v2/test_amphora.py b/octavia_tempest_plugin/tests/api/v2/test_amphora.py
index 06f93ac..44305b4 100644
--- a/octavia_tempest_plugin/tests/api/v2/test_amphora.py
+++ b/octavia_tempest_plugin/tests/api/v2/test_amphora.py
@@ -218,6 +218,11 @@
 
         for new_amp in after_amphorae:
             self.assertNotEqual(amphora_1[const.ID], new_amp[const.ID])
+            waiters.wait_for_status(self.lb_admin_amphora_client.show_amphora,
+                                    new_amp[const.ID], const.STATUS,
+                                    const.STATUS_ALLOCATED,
+                                    CONF.load_balancer.build_interval,
+                                    CONF.load_balancer.build_timeout)
 
     @testtools.skipIf(CONF.load_balancer.test_with_noop,
                       'Log offload tests will not work in noop mode.')
diff --git a/octavia_tempest_plugin/tests/waiters.py b/octavia_tempest_plugin/tests/waiters.py
index 820831a..7cd9fef 100644
--- a/octavia_tempest_plugin/tests/waiters.py
+++ b/octavia_tempest_plugin/tests/waiters.py
@@ -76,8 +76,8 @@
             if caller:
                 message = '({caller}) {message}'.format(caller=caller,
                                                         message=message)
-            raise exceptions.UnexpectedResponseCode(message)
-
+            if not error_ok:
+                raise exceptions.UnexpectedResponseCode(message)
         if int(time.time()) - start >= check_timeout:
             message = (
                 '{name} {field} failed to update to {expected_status} within '
@@ -165,7 +165,7 @@
             LOG.info('%s\'s status updated to DELETED.',
                      show_client.__name__)
             return
-        elif int(time.time()) - start >= check_timeout:
+        if int(time.time()) - start >= check_timeout:
             message = (
                 '{name} {field} failed to update to DELETED or become not '
                 'found (404) within the required time {timeout}. Current '