2020-03-10 14:08:34 -04:00
|
|
|
system "ruby -rrubygems -Ilib bin/pumactl -F test/shell/t2_conf.rb start &"
|
2020-03-17 08:16:45 -04:00
|
|
|
sleep (defined?(JRUBY_VERSION) ? 7 : 5)
|
2013-07-19 02:30:15 -04:00
|
|
|
system "curl http://localhost:10103/"
|
|
|
|
|
2019-06-23 20:36:06 -04:00
|
|
|
out=`ruby -rrubygems -Ilib bin/pumactl -F test/shell/t2_conf.rb status`
|
|
|
|
|
2017-10-19 17:49:31 -04:00
|
|
|
system "ruby -rrubygems -Ilib bin/pumactl -F test/shell/t2_conf.rb stop"
|
2013-07-19 02:30:15 -04:00
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
log = File.read("t2-stdout")
|
|
|
|
|
|
|
|
File.unlink "t2-stdout" if File.file? "t2-stdout"
|
|
|
|
|
2019-06-23 20:36:06 -04:00
|
|
|
if log =~ %r(GET / HTTP/1\.1) && !File.file?("t2-pid") && out == "Puma is started\n"
|
2013-07-19 02:30:15 -04:00
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
end
|