Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestPumaUnixSocket used in both test_rack_handler.rb and test_unix_socket.rb #1652

Closed
MSP-Greg opened this issue Sep 21, 2018 · 2 comments
Closed

Comments

@MSP-Greg
Copy link
Member

Double checking test results, I noticed that the test class name TestPumaUnixSocket is used in two different test files.

class TestPumaUnixSocket < Minitest::Test
def test_handler
handler = Rack::Handler.get(:puma)
assert_equal Rack::Handler::Puma, handler
handler = Rack::Handler.get('Puma')
assert_equal Rack::Handler::Puma, handler
end
end

class TestPumaUnixSocket < Minitest::Test
App = lambda { |env| [200, {}, ["Works"]] }
Path = "test/puma.sock"
def setup
# UNIX sockets are not recommended on JRuby or Windows
skip_on :jruby, :windows, suffix: " - UNIX sockets are not recommended"
@server = Puma::Server.new App
@server.add_unix_listener Path
@server.run
end

Because of the setup code in test_unix_socket.rb, the test is skipped on Windows. The test in test_rack_handler.rb does pass on Windows. Not sure whether to rename the class (to what?), move the test method into another class in the file, etc...

System configuration

Puma Master
Rails NA
Ruby more than most

@MSP-Greg
Copy link
Member Author

See PR #1653. Renamed the class in test_rack_handler.rb to TestHandlerGetStrSym, along with another change.

@MSP-Greg
Copy link
Member Author

MSP-Greg commented Oct 5, 2018

Closed. See PR #1653 & commit 9de253d.

@MSP-Greg MSP-Greg closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant