parent
a52f66328b
commit
66142e7d75
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
- name: integration/runner/forking_correct_parent.yml
|
||||||
|
hosts: test-targets
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# Verify mitogen_task_isolation=fork forks from "virginal fork parent", not
|
||||||
|
# shared interpreter.
|
||||||
|
|
||||||
|
- name: get regular process ID.
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: regular_proc
|
||||||
|
when: is_mitogen
|
||||||
|
|
||||||
|
- name: get force-forked process ID again.
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: fork_proc
|
||||||
|
vars:
|
||||||
|
mitogen_task_isolation: fork
|
||||||
|
when: is_mitogen
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- fork_proc.pid != regular_proc.pid
|
||||||
|
- fork_proc.ppid != regular_proc.pid
|
||||||
|
when: is_mitogen
|
@ -0,0 +1,23 @@
|
|||||||
|
# Verify non-async jobs run in-process.
|
||||||
|
|
||||||
|
- name: integration/runner/forking_inactive.yml
|
||||||
|
hosts: test-targets
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: get process ID.
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: sync_proc1
|
||||||
|
when: is_mitogen
|
||||||
|
|
||||||
|
- name: get process ID again.
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: sync_proc2
|
||||||
|
when: is_mitogen
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- sync_proc1.pid == sync_proc2.pid
|
||||||
|
when: is_mitogen
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue