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

Merged
merged 1 commit into from
Oct 8, 2024

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.

@soutaro soutaro enabled auto-merge October 8, 2024 01:30
@soutaro soutaro added this pull request to the merge queue Oct 8, 2024
Merged via the queue into master with commit 8f80973 Oct 8, 2024
18 checks passed
@soutaro soutaro deleted the random-order branch October 8, 2024 01:39
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