Make non-lockstep callback tests more deterministic (#73511)

This commit is contained in:
Matt Martz 2021-02-05 14:11:40 -06:00 committed by GitHub
parent 67f5bb39c7
commit 125c220343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 18 deletions

View file

@ -3,23 +3,29 @@ PLAY [nonlockstep] *************************************************************
TASK [command] *****************************************************************
changed: [testhost10]
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost10]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost10]
TASK [command] *****************************************************************
changed: [testhost11]
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost12]
PLAY RECAP *********************************************************************

View file

@ -3,23 +3,29 @@ PLAY [nonlockstep] *************************************************************
TASK [command] *****************************************************************
changed: [testhost10]
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost10]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost10]
TASK [command] *****************************************************************
changed: [testhost11]
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost11]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost12]
TASK [command] *****************************************************************
changed: [testhost12]
PLAY RECAP *********************************************************************

View file

@ -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 }}"

View file

@ -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)

View file

@ -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 }}