summaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-04-29 11:10:53 +0000
committerintrigeri <intrigeri@boum.org>2019-04-29 11:10:53 +0000
commit70456889e2a02e00a33f10b004e5f4b7c4b4b764 (patch)
treebadbfcb98843ff48d0157b314ee34d33b5c83d92 /features
parent3dc5dcf9e4b118867ecdd87a3bb25b4cebf4fc9a (diff)
Test suite: avoid zombies by waiting for killed child processes to exit (refs: #14948).
This is part of commit:cc86a75fe6fdbb5ac54714d62f4b8dfe5831eb80, authored by Cyril Brulebois <ckb@riseup.net>.
Diffstat (limited to 'features')
-rw-r--r--features/support/helpers/chatbot_helper.rb1
-rw-r--r--features/support/helpers/sniffing_helper.rb1
-rw-r--r--features/support/helpers/sshd_helper.rb1
-rw-r--r--features/support/hooks.rb1
4 files changed, 4 insertions, 0 deletions
diff --git a/features/support/helpers/chatbot_helper.rb b/features/support/helpers/chatbot_helper.rb
index 23ce3e1..6bee74b 100644
--- a/features/support/helpers/chatbot_helper.rb
+++ b/features/support/helpers/chatbot_helper.rb
@@ -37,6 +37,7 @@ class ChatBot
@otr_key_file.delete
begin
Process.kill("TERM", @pid)
+ Process.wait(@pid)
rescue
# noop
end
diff --git a/features/support/helpers/sniffing_helper.rb b/features/support/helpers/sniffing_helper.rb
index 38b1382..ca9fa27 100644
--- a/features/support/helpers/sniffing_helper.rb
+++ b/features/support/helpers/sniffing_helper.rb
@@ -40,6 +40,7 @@ class Sniffer
def stop
begin
Process.kill("TERM", @pid)
+ Process.wait(@pid)
rescue
# noop
end
diff --git a/features/support/helpers/sshd_helper.rb b/features/support/helpers/sshd_helper.rb
index 2e0069c..a3814fe 100644
--- a/features/support/helpers/sshd_helper.rb
+++ b/features/support/helpers/sshd_helper.rb
@@ -46,6 +46,7 @@ EOF
File.delete("#{$config['TMPDIR']}/ssh.pid")
begin
Process.kill("TERM", @pid)
+ Process.wait(@pid)
rescue
# noop
end
diff --git a/features/support/hooks.rb b/features/support/hooks.rb
index 3983d1f..43c84f3 100644
--- a/features/support/hooks.rb
+++ b/features/support/hooks.rb
@@ -259,6 +259,7 @@ After('@product') do |scenario|
# what the error was.
sleep 3 if scenario.failed?
Process.kill("INT", @video_capture_pid)
+ Process.wait(@video_capture_pid)
save_failure_artifact("Video", @video_path)
end
if scenario.failed?