Skip to content

Commit 98cedb5

Browse files
committed
chore(test): add taskkill on windows
1 parent 611a6ca commit 98cedb5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

spec/integration_with_provider_state_in_headers_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
end
1919

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

spec/integration_with_provider_state_in_path.spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
end
1919

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

0 commit comments

Comments
 (0)