diff --git a/test/test_config.rb b/test/test_config.rb index b478441813..73676bf49d 100644 --- a/test/test_config.rb +++ b/test/test_config.rb @@ -15,7 +15,6 @@ def test_default_max_threads assert_equal max_threads, Puma::Configuration.new.default_max_threads end - def test_app_from_rackup conf = Puma::Configuration.new do |c| c.rackup "test/rackup/hello-bind.ru" @@ -59,19 +58,6 @@ def test_ssl_configuration_from_DSL assert_equal [200, {}, ["embedded app"]], app.call({}) end - def test_custom_logger_from_DSL - conf = Puma::Configuration.new do |c| - c.load "test/config/custom_logger.rb" - end - - conf.load - out, _ = capture_subprocess_io do - conf.options[:logger].write('test') - end - - assert_match /Custom logging: test/, out - end - def test_ssl_bind skip_if :jruby skip_unless :ssl @@ -423,6 +409,18 @@ def assert_run_hooks(hook_name, options = {}) end end +# contains tests that cannot run parallel +class TestConfigFileSingle < TestConfigFileBase + def test_custom_logger_from_DSL + conf = Puma::Configuration.new { |c| c.load 'test/config/custom_logger.rb' } + + conf.load + out, _ = capture_subprocess_io { conf.options[:logger].write 'test' } + + assert_equal 'Custom logging: test', out + end +end + # Thread unsafe modification of ENV class TestEnvModifificationConfig < TestConfigFileBase def test_double_bind_port diff --git a/test/test_thread_pool.rb b/test/test_thread_pool.rb index c6ffc0a68f..77c9383767 100644 --- a/test/test_thread_pool.rb +++ b/test/test_thread_pool.rb @@ -63,10 +63,10 @@ def test_thread_name end def test_thread_name_linux - skip 'Thread.name not supported' unless Thread.current.respond_to?(:name) + skip 'Thread.name not supported' unless Thread.current.respond_to?(:name) && Puma::IS_MRI task_dir = File.join('', 'proc', Process.pid.to_s, 'task') - skip 'This test only works under Linux with appropriate permissions' if !(File.directory?(task_dir) && File.readable?(task_dir)) + skip 'This test only works under Linux and MRI Ruby with appropriate permissions' if !(File.directory?(task_dir) && File.readable?(task_dir)) && Puma::IS_MRI expected_thread_name = 'puma tst tp 001' found_thread = false