File: runner_with_polling_and_timeout.yml

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (27 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Verify 'async: <timeout>' functions as desired.

- name: integration/async/runner_with_polling_and_timeout.yml
  hosts: test-targets
  tasks:

  # Verify async-with-polling-and-timeout behaviour.

  - name: sleep for 7 seconds, but timeout after 1 second.
    ignore_errors: true
    shell: sleep 7
    async: 1
    poll: 1
    register: job1

  - assert:
      that:
        - job1.changed == False
        - job1.failed == True
        - |
          job1.msg == "async task did not complete within the requested time" or
          job1.msg == "async task did not complete within the requested time - 1s" or
          job1.msg == "Job reached maximum time limit of 1 seconds."
      fail_msg: |
        job1={{ job1 }}
  tags:
    - runner_with_polling_and_timeout