You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/ansible/integration/context_service/lru_one_target.yml

43 lines
1.2 KiB
YAML

# Verify a maximum number of contexts are possible on one machine.
- name: integration/context_service/lru_one_target.yml
hosts: test-targets
any_errors_fatal: true
vars:
max_interps: "{{lookup('env', 'MITOGEN_MAX_INTERPRETERS')}}"
ubound: "{{max_interps|int + 1}}"
tasks:
- name: Reset all connections
mitogen_shutdown_all:
when: is_mitogen
# TODO: https://github.com/dw/mitogen/issues/696
# - name: Spin up a bunch of interpreters
# custom_python_detect_environment:
# become: true
# vars:
# ansible_become_user: "mitogen__user{{item}}"
# with_sequence: start=1 end={{ubound}}
# register: first_run
# - name: Reuse them
# custom_python_detect_environment:
# become: true
# vars:
# ansible_become_user: "mitogen__user{{item}}"
# with_sequence: start=1 end={{ubound}}
# register: second_run
# - assert:
# that:
# - first_run.results[item|int].pid == second_run.results[item|int].pid
# with_items: start=0 end={{max_interps}}
# when: is_mitogen
# - assert:
# that:
# - first_run.results[-1].pid != second_run.results[-1].pid
# when: is_mitogen