-
Notifications
You must be signed in to change notification settings - Fork 74
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
Fix an error for minitest-queue
#108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR fixes the following error when running `minitest-queue`: ```console $ bundle exec minitest-queue test/**/*.rb bundler: failed to load command: minitest-queue (/Users/koic/.rbenv/versions/3.2.1/bin/minitest-queue) /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/minitest-5.18.0/lib/minitest/test.rb:74:in `srand': no implicit conversion of nil into Integer (TypeError) srand Minitest.seed ^^^^^^^^^^^^^ from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/minitest-5.18.0/lib/minitest/test.rb:74:in `runnable_methods' from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/test-queue-0.5.0/lib/test_queue/runner/minitest5.rb:59:in `block in initialize' from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/test-queue-0.5.0/lib/test_queue/runner/minitest5.rb:59:in `any?' from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/test-queue-0.5.0/lib/test_queue/runner/minitest5.rb:59:in `initialize' from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/test-queue-0.5.0/bin/minitest-queue:4:in `new' from /Users/koic/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/test-queue-0.5.0/bin/minitest-queue:4:in `<top (required)>' from /Users/koic/.rbenv/versions/3.2.1/bin/minitest-queue:25:in `load' from /Users/koic/.rbenv/versions/3.2.1/bin/minitest-queue:25:in `<top (required)>' ``` And this PR bumps Minitest for testing to a version that fails the test as follows: ```console % appraisal minitest5 bundle exec rake >> BUNDLE_GEMFILE=/Users/koic/src/github.com/tmm1/test-queue/gemfiles/minitest5.gemfile bundle exec rake /Users/koic/.rbenv/versions/3.1.3/bin/ruby -I/Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.1/lib:/Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-support-3.12.0/lib /Users/koic/ .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb ...... Finished in 0.01097 seconds (files took 0.09175 seconds to load) 6 examples, 0 failures TEST_QUEUE_WORKERS=2 TEST_QUEUE_VERBOSE=1 vendor/bats/bin/bats test - cucumber-queue succeeds when all features pass (skipped: cucumber is not installed) - cucumber-queue fails when a feature fails (skipped: cucumber is not installed) - cucumber-queue fails when given a missing feature (skipped: cucumber is not installed) - cucumber-queue fails when given a malformed feature (skipped: cucumber is not installed) - cucumber-queue handles test file being deleted (skipped: cucumber is not installed) - minitest-queue succeeds when all tests pass (skipped: minitest 5.18.0 is not ~> 4.0) - minitest-queue fails when a test fails (skipped: minitest 5.18.0 is not ~> 4.0) - minitest-queue succeeds when all specs pass (skipped: minitest 5.18.0 is not ~> 4.0) - minitest-queue fails when a spec fails (skipped: minitest 5.18.0 is not ~> 4.0) ✗ minitest-queue (minitest5) succeeds when all tests pass (from function `assert_status' in file test/testlib.bash, line 32, in test file test/minitest5.bats, line 17) `assert_status 0' failed Expected status to be 0 but was 1. Full output: bundler: failed to load command: minitest-queue (/Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/bin/minitest-queue) /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/minitest-5.18.0/lib/minitest/test.rb:74:in `srand': no implicit conversion of nil into Integer (TypeError) from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/minitest-5.18.0/lib/minitest/test.rb:74:in `runnable_methods' from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner/minitest5.rb:59:in `block in initialize' from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner/minitest5.rb:59:in `any?' from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner/minitest5.rb:59:in `initialize' from /Users/koic/src/github.com/tmm1/test-queue/exe/minitest-queue:4:in `new' from /Users/koic/src/github.com/tmm1/test-queue/exe/minitest-queue:4:in `<top (required)>' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/bin/minitest-queue:25:in `load' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/bin/minitest-queue:25:in `<top (required)>' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli/exec.rb:58:in `load' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli/exec.rb:58:in `kernel_load' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli/exec.rb:23:in `run' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli.rb:491:in `exec' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli.rb:34:in `dispatch' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/cli.rb:28:in `start' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/exe/bundle:45:in `block in <top (required)>' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' from /Users/koic/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bundler-2.4.6/exe/bundle:33:in `<top (required)>' from /Users/koic/.rbenv/versions/3.1.3/bin/bundle:25:in `load' from /Users/koic/.rbenv/versions/3.1.3/bin/bundle:25:in `<main>' ```
koic
force-pushed
the
fix_an_error_for_minitest_queue
branch
2 times, most recently
from
April 9, 2023 16:58
3def083
to
17c418f
Compare
koic
added a commit
to koic/rubocop-minitest
that referenced
this pull request
Apr 24, 2023
tmm1/test-queue#108 has been released, So RuboCop Minitest can be accelerated for testing by test-queue. 1.5x speedup in an environment: ## Before ```console % bundle exec rake test Run options: --seed 61017 # Running: (snip) Fabulous run in 6.712563s, 348.0042 runs/s, 1010.7913 assertions/s. 2336 runs, 6785 assertions, 0 failures, 0 errors, 0 skips ``` ## After ```console % bunlde exec rake test Starting test-queue master (/tmp/test_queue_12114_1480.sock) ==> Summary (16 workers in 4.2143s) [ 1] 470 runs, 900 assertions, 0 failures, 0 errors, 0 skips 1 suites in 4.2041s (pid 12117 exit 0 ) [ 2] 470 runs, 820 assertions, 0 failures, 0 errors, 0 skips 1 suites in 4.2043s (pid 12118 exit 0 ) [ 3] 81 runs, 81 assertions, 0 failures, 0 errors, 0 skips 1 suites in 4.2042s (pid 12119 exit 0 ) [ 4] 470 runs, 900 assertions, 0 failures, 0 errors, 0 skips 1 suites in 4.2062s (pid 12120 exit 0 ) [ 5] 470 runs, 900 assertions, 0 failures, 0 errors, 0 skips 1 suites in 4.2063s (pid 12121 exit 0 ) [ 6] 23 runs, 25 assertions, 0 failures, 0 errors, 0 skips 2 suites in 4.2062s (pid 12122 exit 0 ) [ 7] 35 runs, 52 assertions, 0 failures, 0 errors, 0 skips 3 suites in 4.2059s (pid 12123 exit 0 ) [ 8] 31 runs, 55 assertions, 0 failures, 0 errors, 0 skips 3 suites in 4.2058s (pid 12124 exit 0 ) [ 9] 37 runs, 62 assertions, 0 failures, 0 errors, 0 skips 4 suites in 4.2055s (pid 12125 exit 0 ) [10] 34 runs, 45 assertions, 0 failures, 0 errors, 0 skips 5 suites in 4.2051s (pid 12126 exit 0 ) [11] 38 runs, 52 assertions, 0 failures, 0 errors, 0 skips 6 suites in 4.2038s (pid 12127 exit 0 ) [12] 34 runs, 46 assertions, 0 failures, 0 errors, 0 skips 5 suites in 4.2031s (pid 12128 exit 0 ) [13] 39 runs, 2690 assertions, 0 failures, 0 errors, 0 skips 5 suites in 4.2019s (pid 12129 exit 0 ) [14] 34 runs, 53 assertions, 0 failures, 0 errors, 0 skips 5 suites in 4.2007s (pid 12130 exit 0 ) [15] 34 runs, 57 assertions, 0 failures, 0 errors, 0 skips 6 suites in 4.1994s (pid 12131 exit 0 ) [16] 36 runs, 47 assertions, 0 failures, 0 errors, 0 skips 5 suites in 4.1980s (pid 12132 exit 0 ) ```
This was referenced Apr 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the following error when running
minitest-queue
:And this PR bumps Minitest for testing to a version that fails the test as follows: