Tech debt - increase test timeouts to remove intermittant test failures (#3146)
This commit is contained in:
parent
1b80b0a810
commit
bed769a387
2 changed files with 5 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ import boto3
|
|||
from botocore.exceptions import ClientError
|
||||
import sure # noqa
|
||||
from moto import mock_batch, mock_iam, mock_ec2, mock_ecs, mock_logs
|
||||
|
||||
import functools
|
||||
import nose
|
||||
|
||||
|
|
@ -729,13 +730,13 @@ def test_submit_job():
|
|||
future = datetime.datetime.now() + datetime.timedelta(seconds=30)
|
||||
|
||||
while datetime.datetime.now() < future:
|
||||
time.sleep(1)
|
||||
resp = batch_client.describe_jobs(jobs=[job_id])
|
||||
|
||||
if resp["jobs"][0]["status"] == "FAILED":
|
||||
raise RuntimeError("Batch job failed")
|
||||
if resp["jobs"][0]["status"] == "SUCCEEDED":
|
||||
break
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
raise RuntimeError("Batch job timed out")
|
||||
|
||||
|
|
@ -872,7 +873,7 @@ def test_terminate_job():
|
|||
|
||||
batch_client.terminate_job(jobId=job_id, reason="test_terminate")
|
||||
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
|
||||
resp = batch_client.describe_jobs(jobs=[job_id])
|
||||
resp["jobs"][0]["jobName"].should.equal("test1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue