Skip to content

Conversation

@vincbeck
Copy link
Contributor

One of the test in the batch hook was marked as xfail as part of this PR. #23539 has been created to fix all the tests flagged as xfail in airflow. This PR fixes the only test related to AWS as part of this issue

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels May 25, 2022
# moto transitions the Batch job status automatically.

job_name = "test-job"
job_cmd = ['/bin/sh -c "for a in `seq 1 2`; do echo Hello World; sleep 0.25; done"']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this optional parameter for multiple reasons:

  • It does not add any value to the test
  • For some reasons, the command failed to run when I run pytest

job_description = aws_clients.batch.describe_jobs(jobs=[job_id])
job_status = [job for job in job_description["jobs"] if job["jobId"] == job_id][0]["status"]
assert job_status == "PENDING"
assert job_status == "RUNNABLE"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out the initial status returned by moto is RUNNABLE

@vincbeck
Copy link
Contributor Author

For the record, the test is still failing. I need to investigate

@vincbeck vincbeck marked this pull request as draft May 25, 2022 23:39
@vincbeck vincbeck closed this Jun 15, 2022
@vincbeck vincbeck deleted the xfail_batch branch August 7, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant