mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
2719585ce9
Split into two tests. 1) First test that raises an NoMethodError with backtrace and message "Oh no an error"[1] and update the assert_match regexp to assert error.message, error.class and error.backtrace.join("\n"). Use //m multiline mode so . matches an newline 2) Second test that raises an custom error of WithoutBacktraceError with message "no backtrace error"[2] which its backtrace is "nil" and check we did go through the code path without backtrace by updating assert_match regexp. I think with the changes we could possibly not needed to skip tests on Windows and TruffleRuby. [1] error looks like this HTTP/1.0 500 Internal Server Error Content-Length: 589 Puma caught this error: Oh no an error raise NoMethodError, "Oh no an error" ^^^^^ (NoMethodError) test/test_puma_server.rb:414:in `block in test_lowlevel_error_message' /Users/hhh/dev/puma/lib/puma/request.rb:87:in `block in handle_request' /Users/hhh/dev/puma/lib/puma/thread_pool.rb:343:in `with_force_shutdown' /Users/hhh/dev/puma/lib/puma/request.rb:86:in `handle_request' /Users/hhh/dev/puma/lib/puma/server.rb:430:in `process_client' /Users/hhh/dev/puma/lib/puma/server.rb:233:in `block in run' /Users/hhh/dev/puma/lib/puma/thread_pool.rb:150:in `block in spawn_thread' [2] error looks like this HTTP/1.1 500 Internal Server Error Content-Length: 91 Puma caught this error: no backtrace error (WithoutBacktraceError) <no backtrace available> |
||
---|---|---|
.. | ||
bundle_app_config_test | ||
bundle_preservation_test | ||
config | ||
helpers | ||
minitest | ||
rackup | ||
worker_gem_independence_test | ||
helper.rb | ||
test_app_status.rb | ||
test_binder.rb | ||
test_bundle_pruner.rb | ||
test_busy_worker.rb | ||
test_cli.rb | ||
test_config.rb | ||
test_error_logger.rb | ||
test_events.rb | ||
test_http10.rb | ||
test_http11.rb | ||
test_integration_cluster.rb | ||
test_integration_pumactl.rb | ||
test_integration_single.rb | ||
test_integration_ssl.rb | ||
test_integration_ssl_session.rb | ||
test_integration_systemd.rb | ||
test_iobuffer.rb | ||
test_json_serialization.rb | ||
test_launcher.rb | ||
test_log_writer.rb | ||
test_minissl.rb | ||
test_null_io.rb | ||
test_out_of_band_server.rb | ||
test_persistent.rb | ||
test_plugin.rb | ||
test_preserve_bundler_env.rb | ||
test_puma_localhost_authority.rb | ||
test_puma_server.rb | ||
test_puma_server_ssl.rb | ||
test_pumactl.rb | ||
test_rack_handler.rb | ||
test_rack_server.rb | ||
test_redirect_io.rb | ||
test_request_invalid.rb | ||
test_response_header.rb | ||
test_state_file.rb | ||
test_thread_pool.rb | ||
test_unix_socket.rb | ||
test_web_server.rb | ||
test_worker_gem_independence.rb |