diff --git a/History.md b/History.md index efaf3375..468cb401 100644 --- a/History.md +++ b/History.md @@ -4,7 +4,7 @@ * Your feature goes here (#Github Number) * Bugfixes - * Fix handling of pre-existing/systemd unix binder files (#1842, #1988) + * Fix socket activation of systemd (pre-existing) unix binder files (#1842, #1988) * Deal with multiple calls to bind correctly (#1986, #1994, #2006) ## 4.2.0 / 2019-09-23 diff --git a/test/test_binder.rb b/test/test_binder.rb index 198370ec..5d161200 100644 --- a/test/test_binder.rb +++ b/test/test_binder.rb @@ -82,13 +82,17 @@ class TestBinder < TestBinderBase skip UNIX_SKT_MSG unless UNIX_SKT_EXIST unix_path = "test/#{name}_server.sock" - File.open(unix_path, mode: 'wb') { |f| f.puts 'pre eixisting' } + File.open(unix_path, mode: 'wb') { |f| f.puts 'pre existing' } @binder.parse ["unix://#{unix_path}"], @events assert_match %r!unix://#{unix_path}!, @events.stdout.string refute_includes @binder.instance_variable_get(:@unix_paths), unix_path + @binder.close_unix_paths + + assert File.exist?(unix_path) + ensure if UNIX_SKT_EXIST File.unlink unix_path if File.exist? unix_path diff --git a/test/test_integration_cluster.rb b/test/test_integration_cluster.rb index 0973b511..9679f274 100644 --- a/test/test_integration_cluster.rb +++ b/test/test_integration_cluster.rb @@ -19,9 +19,9 @@ class TestIntegrationCluster < TestIntegration def test_pre_existing_unix skip UNIX_SKT_MSG unless UNIX_SKT_EXIST - File.open(@bind_path, mode: 'wb') { |f| f.puts 'pre eixisting' } + File.open(@bind_path, mode: 'wb') { |f| f.puts 'pre existing' } - cli_server "-w #{WORKERS} -t 0:6 -q test/rackup/sleep_step.ru", unix: :unix + cli_server "-w #{WORKERS} -q test/rackup/sleep_step.ru", unix: :unix stop_server