Skip to content

Commit

Permalink
loop microbot test, increase sleep between to 60
Browse files Browse the repository at this point in the history
This is due to not all pods ready in time for microbot test to run

Should address: https://bugs.launchpad.net/charm-kubernetes-worker/+bug/1878231

Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
  • Loading branch information
Adam Stokes committed May 13, 2020
1 parent 9aea608 commit 11a0b52
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions jobs/integration/validation.py
Expand Up @@ -305,7 +305,6 @@ async def test_rbac_flag(model):


@pytest.mark.asyncio
@pytest.mark.skip_arch(["aarch64"])
async def test_microbot(model, tools):
""" Validate the microbot action """
unit = model.applications["kubernetes-worker"].units[0]
Expand All @@ -314,7 +313,7 @@ async def test_microbot(model, tools):
action = await unit.run_action("microbot", replicas=3)
await action.wait()
assert action.status == "completed"
for i in range(60):
while True:
try:
resp = await tools.requests.get(
"http://" + action.data["results"]["address"],
Expand All @@ -328,12 +327,9 @@ async def test_microbot(model, tools):
"retrying. Error follows:"
)
click.echo(traceback.print_exc())
await asyncio.sleep(0.5)
raise MicrobotError("Microbot failed to start.")

await asyncio.sleep(60)

@pytest.mark.asyncio
@pytest.mark.skip_arch(["aarch64"])
async def test_dashboard(model, log_dir, tools):
""" Validate that the dashboard is operational """
unit = model.applications["kubernetes-master"].units[0]
Expand Down

0 comments on commit 11a0b52

Please sign in to comment.