We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7a7b25 commit 94865deCopy full SHA for 94865de
spec/integration/puppet_x/puppetlabs/powershell_manager_spec.rb
@@ -66,6 +66,12 @@ def create_manager()
66
expected_error = /Failure waiting for PowerShell process (\d+) to start pipe server/
67
expect(e.message).to match expected_error
68
pid = expected_error.match(e.message)[1].to_i
69
+
70
+ # We want to make sure that enough time has elapsed since the manager called kill
71
+ # for the OS to finish killing the process and doing all of it's cleanup.
72
+ # We have found that without an appropriate wait period, the kill call below
73
+ # can return unexpected results and fail the test.
74
+ sleep(1)
75
expect{Process.kill(0, pid)}.to raise_error(Errno::ESRCH)
76
end
77
0 commit comments