Skip to content

Commit 4b9b1ca

Browse files
committed
tests: work around AnsibleModule.run_command() race.
See ansible/ansible#51393
1 parent e12f391 commit 4b9b1ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/ansible/integration/async/runner_one_job.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
# Verify output of a single async job.
1010

1111
- name: start 2 second op
12+
# Sleep after writing; see https://github.com/ansible/ansible/issues/51393
1213
shell: |
14+
echo alldone;
1315
sleep 1;
14-
echo alldone
1516
async: 1000
1617
poll: 0
1718
register: job1
@@ -40,9 +41,9 @@
4041
# ansible/b72e989e1837ccad8dcdc926c43ccbc4d8cdfe44
4142
- |
4243
(ansible_version.full >= '2.8' and
43-
result1.cmd == "sleep 1;\necho alldone\n") or
44+
result1.cmd == "echo alldone;\nsleep 1;\n") or
4445
(ansible_version.full < '2.8' and
45-
result1.cmd == "sleep 1;\n echo alldone")
46+
result1.cmd == "echo alldone;\n sleep 1;")
4647
- result1.delta|length == 14
4748
- result1.start|length == 26
4849
- result1.finished == 1

0 commit comments

Comments
 (0)