Commit 5766be18 authored by Wandenberg's avatar Wandenberg

check for connections on non time wait state

parent 64877b6a
...@@ -12,6 +12,8 @@ Signal.trap("CLD", "IGNORE") ...@@ -12,6 +12,8 @@ Signal.trap("CLD", "IGNORE")
RSpec.configure do |config| RSpec.configure do |config|
config.after(:each) do config.after(:each) do
non_time_wait_connections = `netstat -an | grep ":#{nginx_port} " | grep -v TIME_WAIT | grep -v LISTEN`.chomp.split("\n")
abort "There are sockects on non time wait state: #{non_time_wait_connections.join("\n")}" if non_time_wait_connections.count > 0
NginxTestHelper::Config.delete_config_and_log_files(config_id) if has_passed? NginxTestHelper::Config.delete_config_and_log_files(config_id) if has_passed?
end end
config.order = "random" config.order = "random"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment