Skip to content

Conversation

@tikkss
Copy link
Contributor

@tikkss tikkss commented Dec 17, 2025

GitHub: GH-235, fix GH-350

This patch will fix the following error:

$ ruby test/run.rb --parallel=thread -v
Loaded suite test
Started
(snip)
lib/test/unit/ui/console/testrunner.rb:522:in 'String#*': negative
argument (ArgumentError)

              " " * @indent
                    ^^^^^^^
(snip)

TestSuiteThreadRunner.run_all_tests executes multiple times from TestUnitTestUtil._run_test. However The top level test suite event must emit once.

options[:test_suite] argument does not assigned when executes from TestUnitTestUtil._run_test. So the top level test suite event emit once.

GitHub: test-unitGH-235, fix test-unitGH-350

This patch will fix the following error:

```console
$ ruby test/run.rb --parallel=thread -v
Loaded suite test
Started
(snip)
lib/test/unit/ui/console/testrunner.rb:522:in 'String#*': negative
argument (ArgumentError)

              " " * @indent
                    ^^^^^^^
(snip)
```

`TestSuiteThreadRunner.run_all_tests` executes multiple times from
`TestUnitTestUtil._run_test`. However The top level test suite event
must emit once.

`options[:test_suite]` argument does not assigned when executes from
`TestUnitTestUtil._run_test`. So the top level test suite event emit
once.
tikkss and others added 2 commits December 18, 2025 20:46
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Because `run_tests_recursive` may run some tests immediately.

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
@tikkss
Copy link
Contributor Author

tikkss commented Dec 18, 2025

CI has failed as below:

It seems that this is unrelated to this change. I'll re run only failed jobs.

3.3 on Windows

Current runner version: '2.330.0'
Runner Image Provisioner
Operating System
Runner Image
GITHUB_TOKEN Permissions
Secret source: None
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v6' (SHA:8e8c483db84b4bee98b60c0593521ed34d9990e8)
Download action repository 'ruby/setup-ruby@v1' (SHA:211ffaaa5f8dda97e9e8bca4e70d0fbaf2f8c41c)
Warning: Failed to download action 'https://api.github.com/repos/ruby/setup-ruby/zipball/211ffaaa5f8dda97e9e8bca4e70d0fbaf2f8c41c'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (codeload.github.com:443) 
Warning: Back off 23.465 seconds before retry.
Warning: Failed to download action 'https://api.github.com/repos/ruby/setup-ruby/zipball/211ffaaa5f8dda97e9e8bca4e70d0fbaf2f8c41c'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (codeload.github.com:443) 
Warning: Back off 27.644 seconds before retry.
Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (codeload.github.com:443)

3.4 on Windows + Thread:

Run ruby/setup-ruby@v1
Downloading msys2 build tools
Error: Error: connect ETIMEDOUT 140.82.116.3:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)

@tikkss
Copy link
Contributor Author

tikkss commented Dec 18, 2025

I'll re run only failed jobs.

All CI has been successful.

@kou kou merged commit 2eb8394 into test-unit:master Dec 19, 2025
76 of 78 checks passed
@tikkss tikkss deleted the thread-runner-emit-missing-top-level-test-suite-event branch December 19, 2025 03:07
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

Successfully merging this pull request may close these issues.

thread runner: tests have failed with verbose option

2 participants