Skip to content

Commit 86bf20b

Browse files
(PUP-11897) Add additional mocking to the execution spec
With the change in 4f35fd2, the execution tests need to have mocked out the an addtional call to `waitpid2` that has the flag set to zero.
1 parent 104f0ea commit 86bf20b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/unit/util/execution_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def stub_process_wait(exitstatus)
2929
allow(FFI::WIN32).to receive(:CloseHandle).with(thread_handle)
3030
else
3131
allow(Process).to receive(:waitpid2).with(pid, Process::WNOHANG).and_return(nil, [pid, double('child_status', :exitstatus => exitstatus)])
32+
allow(Process).to receive(:waitpid2).with(pid, 0).and_return(nil, [pid, double('child_status', :exitstatus => exitstatus)])
3233
allow(Process).to receive(:waitpid2).with(pid).and_return([pid, double('child_status', :exitstatus => exitstatus)])
3334
end
3435
end

0 commit comments

Comments
 (0)