issue #159: verify no more than 20 tasks exist on the remote

This commit is contained in:
David Wilson 2018-04-12 12:37:31 +01:00
parent 633cd888a0
commit 6394226722
3 changed files with 36 additions and 1 deletions

View File

@ -6,5 +6,6 @@
- import_playbook: action/all.yml
- import_playbook: become/all.yml
- import_playbook: connection_loader/all.yml
- import_playbook: runner/all.yml
- import_playbook: context_service/all.yml
- import_playbook: playbook_semantics/all.yml
- import_playbook: runner/all.yml

View File

@ -0,0 +1 @@
- import_playbook: lru_one_target.yml

View File

@ -0,0 +1,33 @@
# 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