Commit 814f76b9 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

putting number of workers to run tests as a environment variable

parent a106f249
......@@ -25,7 +25,7 @@ module BaseTestCase
def teardown
unless @disable_start_stop_server
self.stop_server
#self.delete_config_file
self.delete_config_file
end
end
......@@ -45,6 +45,10 @@ module BaseTestCase
return ENV['NGINX_PORT'].nil? ? "9990" : ENV['NGINX_PORT']
end
def nginx_workers
return ENV['NGINX_WORKERS'].nil? ? "1" : ENV['NGINX_WORKERS']
end
def start_server
error_message = ""
status = POpen4::popen4("#{ nginx_executable } -c #{ Dir.tmpdir }/#{ @test_config_file }") do |stdout, stderr, stdin, pid|
......@@ -143,7 +147,7 @@ error_log logs/nginx-main_error.log debug;
# Development Mode
master_process off;
daemon off;
worker_processes 1;
worker_processes <%=nginx_workers%>;
events {
worker_connections 1024;
......
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