Skip to content

Commit

Permalink
chore(test): add taskkill on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Nov 29, 2024
1 parent 611a6ca commit 98cedb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion spec/integration_with_provider_state_in_headers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
end

after(:all) do
Process.kill 'KILL', @pipe.pid
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
system("taskkill /im #{@pipe.pid} /f /t >nul 2>&1")
else
Process.kill 'KILL', @pipe.pid
end
end
end
6 changes: 5 additions & 1 deletion spec/integration_with_provider_state_in_path.spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
end

after(:all) do
Process.kill 'KILL', @pipe.pid
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
system("taskkill /im #{@pipe.pid} /f /t >nul 2>&1")
else
Process.kill 'KILL', @pipe.pid
end
end
end

0 comments on commit 98cedb5

Please sign in to comment.