mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
![Benoit Daloze](/assets/img/avatar_default.png)
* Support skip_on :truffleruby * Remove unused variable declaration * Properly skip tests which need fork * Improve NO_FORK_MSG * Keep the Tempfile instances alive in test_redirect_io.rb * Otherwise they could GC in the middle of the test, and the files could then be deleted. * Use a better way to find a free port * Read directly from the socket in #read_and_drop * There is no point to decode the bytes since we are closing the socket in Puma::MiniSSL::Socket#close. * Also, calling #engine_read_all might cause further SSL errors, which could hide the first SSL error. This notably happens in TestPumaServerSSLClient#test_verify_fail_if_no_client_cert if the server is faster than the client. The error in that case is "System error: Success - 0 (Puma::MiniSSL::SSLError)" which is not actually an error, but there is also nothing to read further from SSL. * TruffleRuby should pass the CI now, remove from allowed failures * Use a timeout of 120 for all non-MRI implementations * 60 doesn't seem enough in CI for TestThreadPool#test_trim on TruffleRuby. * Fix check for cluster mode in integration tests * Improve integration tests to fail more clearly if the pid file does not exist * Make integration tests more robust * Add skips for unreliable or racy tests * Add ChangeLog entry * No need to run RuboCop on non-MRI implementations * This should speed up CI a bit for those jobs.
18 lines
392 B
Ruby
18 lines
392 B
Ruby
system "ruby -rrubygems -Ilib bin/puma -p 10102 -C test/shell/t1_conf.rb test/rackup/hello.ru &"
|
|
|
|
sleep 1 until system "curl http://localhost:10102/"
|
|
|
|
Process.kill :TERM, Integer(File.read("t1-pid"))
|
|
|
|
sleep 1
|
|
|
|
log = File.read("t1-stdout")
|
|
|
|
File.unlink "t1-stdout" if File.file? "t1-stdout"
|
|
File.unlink "t1-pid" if File.file? "t1-pid"
|
|
|
|
if log =~ %r!GET / HTTP/1\.1!
|
|
exit 0
|
|
else
|
|
exit 1
|
|
end
|