mitogen/tests/ansible/integration/context_service/lru_one_target.yml

34 lines
884 B
YAML

# Verify a maximum number of contexts are possible on one machine.
- hosts: all
any_errors_fatal: true
tasks:
- name: integration/context_service/lru_one_target.yml
assert:
that: true
- 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=21
register: first_run
- name: Reuse them
custom_python_detect_environment:
become: true
vars:
ansible_become_user: "mitogen__user{{item}}"
with_sequence: start=1 end=21
register: second_run
- assert:
that:
- first_run.results[item|int].pid == second_run.results[item|int].pid
with_items: start=0 end=20
- assert:
that:
- first_run.results[-1].pid != second_run.results[-1].pid