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

Deterministic requires in test/runner #3324

Merged
merged 1 commit into from Jan 30, 2024

Conversation

dentarg
Copy link
Member

@dentarg dentarg commented Jan 30, 2024

We had (rack2) tests fail on 2.4 like this:

/home/runner/work/puma/puma/lib/rack/handler/puma.rb:140:in `<top (required)>': undefined method `register' for Rack::Handler:Module (NoMethodError)
        from /home/runner/work/puma/puma/test/test_rack_handler.rb:6:in `require'
        from /home/runner/work/puma/puma/test/test_rack_handler.rb:6:in `<module:TestRackUp>'
        from /home/runner/work/puma/puma/test/test_rack_handler.rb:5:in `<top (required)>'
        from test/runner:32:in `require'
        from test/runner:32:in `block in <main>'
        from test/runner:32:in `each'
        from test/runner:32:in `<main>'

https://github.com/puma/puma/actions/runs/7672076948/job/20911807383#step:10:13

We had (rack2) tests fail on 2.4 like this:

    /home/runner/work/puma/puma/lib/rack/handler/puma.rb:140:in `<top (required)>': undefined method `register' for Rack::Handler:Module (NoMethodError)
            from /home/runner/work/puma/puma/test/test_rack_handler.rb:6:in `require'
            from /home/runner/work/puma/puma/test/test_rack_handler.rb:6:in `<module:TestRackUp>'
            from /home/runner/work/puma/puma/test/test_rack_handler.rb:5:in `<top (required)>'
            from test/runner:32:in `require'
            from test/runner:32:in `block in <main>'
            from test/runner:32:in `each'
            from test/runner:32:in `<main>'
@dentarg dentarg requested a review from MSP-Greg January 30, 2024 16:15
@MSP-Greg
Copy link
Member

MSP-Greg commented Jan 30, 2024

@dentarg

Thanks. Rather interesting to look at Ruby docs for this (Dir.glob).

Ruby 2.6 states:
"Case sensitivity depends on your system (File::FNM_CASEFOLD is ignored), as does the order in which the results are returned."

Earlier Rubies are rather vague.

Ruby 3.x added a sort keyword arg, and stated:
"The results which matched single wildcard or character set are sorted in binary ascending order, unless false is given as the optional sort keyword argument."

You probably saw it, but macOS 14 is now available with Actions...

@dentarg
Copy link
Member Author

dentarg commented Jan 30, 2024

You probably saw it, but macOS 14 is now available with Actions...

I did see that :) Finally 🎉

@dentarg dentarg merged commit 7cdfa57 into puma:master Jan 30, 2024
67 of 71 checks passed
@dentarg dentarg deleted the ci/test/runner/sort branch January 30, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants