diff options
author | Matt Davis <nitzmahone@users.noreply.github.com> | 2017-03-15 00:37:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 00:37:55 +0100 |
commit | ce56da69b2df3d5fda1044887ff83345bbcd81f7 (patch) | |
tree | 59de9f606151b971493f7939363cbd73534155e1 /test/integration/targets/win_async_wrapper | |
parent | Add `--failure-ok` option to `ansible-test`. (#22623) (diff) | |
download | ansible-ce56da69b2df3d5fda1044887ff83345bbcd81f7.tar.xz ansible-ce56da69b2df3d5fda1044887ff83345bbcd81f7.zip |
make windows async ... async (#22624)
Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
Diffstat (limited to 'test/integration/targets/win_async_wrapper')
-rw-r--r-- | test/integration/targets/win_async_wrapper/tasks/main.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/integration/targets/win_async_wrapper/tasks/main.yml b/test/integration/targets/win_async_wrapper/tasks/main.yml index 8a2fd351ab..fc8f154f14 100644 --- a/test/integration/targets/win_async_wrapper/tasks/main.yml +++ b/test/integration/targets/win_async_wrapper/tasks/main.yml @@ -1,3 +1,7 @@ +- name: capture timestamp before fire and forget + set_fact: + start_timestamp: "{{ lookup('pipe', 'date +%s') }}" + - name: async fire and forget async_test: sleep_delay_sec: 5 @@ -12,6 +16,8 @@ - asyncresult.started == 1 - asyncresult.finished == 0 - asyncresult.results_file is search('\.ansible_async.+\d+\.\d+') + # ensure that async is actually async- this test will fail if # hosts > forks or if the target host is VERY slow + - (lookup('pipe', 'date +%s') | int) - (start_timestamp | int) < 5 - name: async poll immediate success async_test: |