commit
d58ac0280b
@ -1 +1,2 @@
|
|||||||
- import_playbook: lru_one_target.yml
|
- import_playbook: lru_one_target.yml
|
||||||
|
- import_playbook: reconnection.yml
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
# Test ContextService ability to handle disconnections, including handling
|
||||||
|
# cleanup of dependent (via=) contexts.
|
||||||
|
|
||||||
|
- name: integration/context_service/reconnection.yml
|
||||||
|
hosts: all
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: old_become_env
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
# This must be >1 for vanilla Ansible.
|
||||||
|
shell: |
|
||||||
|
bash -c "( sleep 3; pkill -f sshd:; ) & disown"
|
||||||
|
|
||||||
|
- connection: local
|
||||||
|
shell: sleep 3
|
||||||
|
|
||||||
|
- wait_for_connection:
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: new_become_env
|
||||||
|
|
||||||
|
# Verify the PIDs really changed (i.e. disconnection happened)
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- old_become_env.pid != new_become_env.pid
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# I am a Python interpreter that sits idle until the connection times out.
|
||||||
|
exec -a mitogen-tests-python-never-responds.sh sleep 86400
|
||||||
Loading…
Reference in New Issue