diff --git a/paasta_itests/steps/setup_marathon_job_steps.py b/paasta_itests/steps/setup_marathon_job_steps.py index 53ecfe8698..f982985d7d 100644 --- a/paasta_itests/steps/setup_marathon_job_steps.py +++ b/paasta_itests/steps/setup_marathon_job_steps.py @@ -17,6 +17,7 @@ import mock from behave import then from behave import when +from marathon.exceptions import MarathonHttpError from paasta_tools import marathon_tools from paasta_tools import setup_marathon_job @@ -104,7 +105,10 @@ def change_number_of_context_instances(context, number): @when(u'we run setup_marathon_job until the instance count is {number}') def run_setup_marathon_job(context, number): while context.marathon_client.get_app(fake_appid).instances != int(number): - create_complete_app(context) + try: + create_complete_app(context) + except MarathonHttpError: + continue time.sleep(1)