diff options
author | Matt Martz <matt@sivel.net> | 2021-02-05 21:11:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 21:11:40 +0100 |
commit | 125c220343deb60ad64f4a412e6f670ddb511f4c (patch) | |
tree | 81a96e83f0dea61948ca121cbad95af98e2d6c3b /test/integration | |
parent | galaxy - add format options for collection list (#73474) (diff) | |
download | ansible-125c220343deb60ad64f4a412e6f670ddb511f4c.tar.xz ansible-125c220343deb60ad64f4a412e6f670ddb511f4c.zip |
Make non-lockstep callback tests more deterministic (#73511)
Diffstat (limited to 'test/integration')
5 files changed, 28 insertions, 16 deletions
diff --git a/test/integration/targets/callback_default/callback_default.out.free.stdout b/test/integration/targets/callback_default/callback_default.out.free.stdout index 1c743fb673..0ec0447978 100644 --- a/test/integration/targets/callback_default/callback_default.out.free.stdout +++ b/test/integration/targets/callback_default/callback_default.out.free.stdout @@ -3,23 +3,29 @@ PLAY [nonlockstep] ************************************************************* TASK [command] ***************************************************************** changed: [testhost10] -changed: [testhost11] TASK [command] ***************************************************************** changed: [testhost10] TASK [command] ***************************************************************** -changed: [testhost12] +changed: [testhost10] TASK [command] ***************************************************************** -changed: [testhost10] +changed: [testhost11] TASK [command] ***************************************************************** changed: [testhost11] -changed: [testhost12] TASK [command] ***************************************************************** changed: [testhost11] + +TASK [command] ***************************************************************** +changed: [testhost12] + +TASK [command] ***************************************************************** +changed: [testhost12] + +TASK [command] ***************************************************************** changed: [testhost12] PLAY RECAP ********************************************************************* diff --git a/test/integration/targets/callback_default/callback_default.out.host_pinned.stdout b/test/integration/targets/callback_default/callback_default.out.host_pinned.stdout index 1c743fb673..0ec0447978 100644 --- a/test/integration/targets/callback_default/callback_default.out.host_pinned.stdout +++ b/test/integration/targets/callback_default/callback_default.out.host_pinned.stdout @@ -3,23 +3,29 @@ PLAY [nonlockstep] ************************************************************* TASK [command] ***************************************************************** changed: [testhost10] -changed: [testhost11] TASK [command] ***************************************************************** changed: [testhost10] TASK [command] ***************************************************************** -changed: [testhost12] +changed: [testhost10] TASK [command] ***************************************************************** -changed: [testhost10] +changed: [testhost11] TASK [command] ***************************************************************** changed: [testhost11] -changed: [testhost12] TASK [command] ***************************************************************** changed: [testhost11] + +TASK [command] ***************************************************************** +changed: [testhost12] + +TASK [command] ***************************************************************** +changed: [testhost12] + +TASK [command] ***************************************************************** changed: [testhost12] PLAY RECAP ********************************************************************* diff --git a/test/integration/targets/callback_default/inventory b/test/integration/targets/callback_default/inventory index 9236403493..6d9b302898 100644 --- a/test/integration/targets/callback_default/inventory +++ b/test/integration/targets/callback_default/inventory @@ -5,6 +5,6 @@ testhost ansible_connection=local ansible_python_interpreter="{{ ansible_playboo testhost5 ansible_host=169.254.199.200 # no connection is ever established with this host [nonlockstep] -testhost10 i=1.0 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" -testhost11 i=2.0 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" -testhost12 i=3.0 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" +testhost10 i=0.5 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" +testhost11 i=3.0 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" +testhost12 i=12.0 ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}" diff --git a/test/integration/targets/callback_default/runme.sh b/test/integration/targets/callback_default/runme.sh index 537abfd94e..934586d725 100755 --- a/test/integration/targets/callback_default/runme.sh +++ b/test/integration/targets/callback_default/runme.sh @@ -194,5 +194,5 @@ cat meta_test.out rm -f meta_test.out # Ensure free/host_pinned non-lockstep strategies display correctly -diff -u <(ANSIBLE_STRATEGY=free ansible-playbook -i inventory test_non_lockstep.yml 2>/dev/null) callback_default.out.free.stdout -diff -u <(ANSIBLE_STRATEGY=host_pinned ansible-playbook -i inventory test_non_lockstep.yml 2>/dev/null) callback_default.out.host_pinned.stdout +diff -u callback_default.out.free.stdout <(ANSIBLE_STRATEGY=free ansible-playbook -i inventory test_non_lockstep.yml 2>/dev/null) +diff -u callback_default.out.host_pinned.stdout <(ANSIBLE_STRATEGY=host_pinned ansible-playbook -i inventory test_non_lockstep.yml 2>/dev/null) diff --git a/test/integration/targets/callback_default/test_non_lockstep.yml b/test/integration/targets/callback_default/test_non_lockstep.yml index 8a05029be1..b656ee91bf 100644 --- a/test/integration/targets/callback_default/test_non_lockstep.yml +++ b/test/integration/targets/callback_default/test_non_lockstep.yml @@ -2,6 +2,6 @@ - hosts: nonlockstep gather_facts: false tasks: - - command: sleep {{ 2 * i }} - - command: sleep {{ 2 * i }} - - command: sleep {{ 2 * i }} + - command: sleep {{ i }} + - command: sleep {{ i }} + - command: sleep {{ i }} |