From 33939f7fe8bb214cf87260fafb2f6be683ce5fea Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Wed, 13 Mar 2019 11:22:59 +1000 Subject: [PATCH] win_psexec: make the tests more stable (#53716) --- test/integration/targets/win_psexec/aliases | 1 - test/integration/targets/win_psexec/tasks/main.yml | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/integration/targets/win_psexec/aliases b/test/integration/targets/win_psexec/aliases index a4da730eaa..3cf5b97e80 100644 --- a/test/integration/targets/win_psexec/aliases +++ b/test/integration/targets/win_psexec/aliases @@ -1,2 +1 @@ shippable/windows/group3 -unstable diff --git a/test/integration/targets/win_psexec/tasks/main.yml b/test/integration/targets/win_psexec/tasks/main.yml index a1245cdc31..a09401ccff 100644 --- a/test/integration/targets/win_psexec/tasks/main.yml +++ b/test/integration/targets/win_psexec/tasks/main.yml @@ -41,12 +41,10 @@ system: yes nobanner: true register: whoami_as_system - -- name: Test whoami as SYSTEM - assert: - that: - - whoami_as_system.rc == 0 - - whoami_as_system.stdout == 'nt authority\system' + # Seems to be a bug with PsExec where the stdout can be empty, just retry the task to make this test a bit more stable + until: whoami_as_system.rc == 0 and whoami_as_system.stdout == 'nt authority\system' + retries: 3 + delay: 2 # FIXME: Behaviour is not consistent on all Windows systems #- name: Run whoami as ELEVATED