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

Randomize stdlib test order to uncover hidden assumptions #2043

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Oct 2, 2024

#2042 didn't reproduce in our CI, because Net_HTTP_test.rb sets $stdout between Kernel_test.rb and Open3_test.rb. CI in ruby/ruby skips the Net::HTTP tests to avoid unpredictable result caused by external network request, which uncovered the $stdout reset problem.

I hope randomizing the testing order will uncover this kind of problems.

@soutaro
Copy link
Member Author

soutaro commented Oct 2, 2024

Is it reporting a true problem??? 👀

Failure: test_accept_charset(CGISingletonTest):
  Call trace does not match with given method type: #<struct RBS::Test::CallTrace method_name=:accept_charset, method_call=<RBS::Test::ArgumentsReturn:@arguments: [], @exit_value: #<Encoding:UTF-8>, @exit_type: :return>, block_calls=[], block_given=false>.
  <["[Class#accept_charset] ReturnTypeError: expected `::String` but returns `#<Encoding:UTF-8>`"]> was expected to be empty.
/home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:183:in 'block in RBS::UnitTest::TypeAssertions#assert_send_type'
/home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:168:in 'RBS::UnitTest::TypeAssertions#send_setup'
/home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/CGI_test.rb:25:in 'CGISingletonTest#test_accept_charset'

@soutaro soutaro added this to the RBS 3.7 milestone Oct 3, 2024
@soutaro
Copy link
Member Author

soutaro commented Oct 3, 2024

The problem will be fixed by #2045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant