turbo_tests2 3.2.14 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +27 -1
- data/README.md +64 -16
- data/lib/turbo_tests/runner.rb +97 -1
- data/lib/turbo_tests/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b455a333f0fe9a3521173ff0e73b309b74baa6b37da905f5fcfa1a79a5eb075b
|
|
4
|
+
data.tar.gz: 8a2f7d15910049b3b8366fd1ed6e604581a6c7444a6e95babdcb2f344e73b054
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cee9299d9a75a189a763621873df30959b68999972212f05f4ea81ba04200c66d9cbb56e2cc402947b58689881b16cdbc25ac9579205c473c4f359a2cab72ca
|
|
7
|
+
data.tar.gz: 8ec3ac430a73305ae22bbc58c4ad9e82e0f04f41645853b8da4d50a24f868fe5a6611e5a222774a423df2db89e5176f4f69221ed32adcb85771fab482093b85b
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,30 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.2.15] - 2026-10-13
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.2.15][3.2.15t]
|
|
36
|
+
- COVERAGE: 96.67% -- 988/1022 lines in 11 files
|
|
37
|
+
- BRANCH COVERAGE: 85.06% -- 262/308 branches in 11 files
|
|
38
|
+
- 39.42% documented
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- [kc] kettle-jem/prepare: updated 13 project files:
|
|
43
|
+
- configuration (1)
|
|
44
|
+
- dependencies (12)
|
|
45
|
+
- [kc] kettle-jem/template: updated 12 project files:
|
|
46
|
+
- code and tests (2)
|
|
47
|
+
- documentation (1)
|
|
48
|
+
- other (2)
|
|
49
|
+
- workflows (7)
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- The “Runtime and Platform Support” table in the README listed TruffleRuby 22.3, 23.0 and TruffleRuby-head as covered by CI, and described `rspec-pending_for` spec exclusions for 22.3/23.0. No workflow runs those engines (CI covers TruffleRuby 23.1, 24.2, 25.0, 33.0 and current), `heads.yml` runs `ruby-head` and `jruby-head` only, and `rspec-pending_for` is neither a dependency nor referenced by any spec. The badge rows for 22.3/23.0 had already been removed by templating, leaving the prose table describing CI that no longer runs.
|
|
54
|
+
|
|
55
|
+
- Watchdog on the worker message queue: if no worker message arrives within TURBO_TESTS2_WATCHDOG_SECONDS (default 900), remaining workers are killed, unfinished groups reported, and the run fails — instead of blocking forever when a worker dies without an exit message (the parallel-worker CI hang class on 4-core runners)
|
|
56
|
+
|
|
33
57
|
## [3.2.14] - 2026-10-08
|
|
34
58
|
|
|
35
59
|
- TAG: [v3.2.14][3.2.14t]
|
|
@@ -718,7 +742,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
718
742
|
|
|
719
743
|
- Initial release
|
|
720
744
|
|
|
721
|
-
[Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.
|
|
745
|
+
[Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.15...HEAD
|
|
746
|
+
[3.2.15]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.14...v3.2.15
|
|
747
|
+
[3.2.15t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.15
|
|
722
748
|
[3.2.14]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.13...v3.2.14
|
|
723
749
|
[3.2.14t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.14
|
|
724
750
|
[3.2.13]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.12...v3.2.13
|
data/README.md
CHANGED
|
@@ -48,18 +48,17 @@ work in an untested environment:
|
|
|
48
48
|
| MRI head | Parallel support | Unsupported | Unsupported | CI is allowed to fail while Ruby is in development. |
|
|
49
49
|
| JRuby 9.2-9.4 | Parallel support | Unsupported | Unsupported | Versioned JRuby workflows run on Linux. |
|
|
50
50
|
| JRuby 10.0/current/head | Parallel support | Unsupported | Unsupported | Experimental/current and head jobs are non-blocking in CI. |
|
|
51
|
-
| TruffleRuby 22.3 | Parallel support | Unsupported | Unsupported | Experimental. The CLI and multi-process spec groups are skipped because this release reports Ruby compatibility version 3.0. |
|
|
52
|
-
| TruffleRuby 23.0 | Single-worker support | Unsupported | Unsupported | Experimental and end-of-life; CI caps workers at one. The CLI and multi-process spec groups are also skipped. |
|
|
53
51
|
| TruffleRuby 23.1 | Parallel support | Unsupported | Unsupported | Experimental. |
|
|
54
52
|
| TruffleRuby 24.2/25.0/33.0/current | Parallel support | Unsupported | Unsupported | Linux workflows run the suite with parallel workers. |
|
|
55
|
-
| TruffleRuby head | Parallel support | Unsupported | Unsupported | CI is allowed to fail while TruffleRuby is in development. |
|
|
56
53
|
|
|
57
|
-
The
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
The Windows current-Ruby job runs in parallel, but runtime-log recording is
|
|
55
|
+
disabled there because the runtime logger needs file locking that Windows does
|
|
56
|
+
not provide reliably (`record_runtime = !Gem.win_platform?`); see below.
|
|
57
|
+
|
|
58
|
+
TruffleRuby 22.3, 23.0 and TruffleRuby-head are not listed because no workflow
|
|
59
|
+
covers them. `heads.yml` runs `ruby-head` and `jruby-head` only, and
|
|
60
|
+
`dep-heads.yml` runs the released `truffleruby` engine against head-of-branch
|
|
61
|
+
dependencies, which is not a head engine build.
|
|
63
62
|
|
|
64
63
|
### Why incremental output?
|
|
65
64
|
|
|
@@ -99,7 +98,7 @@ Finished in 2 minute 25.15 seconds (files took 0 seconds to load)
|
|
|
99
98
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
100
99
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
101
100
|
| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎jruby-9.2-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎jruby-9.3-wf] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎jruby-9.4-wf] [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
102
|
-
| Works with Truffle Ruby | [![Truffle Ruby
|
|
101
|
+
| Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
|
|
103
102
|
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
104
103
|
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
105
104
|
| Works with MRI Ruby 2 | [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
|
|
@@ -138,6 +137,23 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
|
138
137
|
|
|
139
138
|
</details>
|
|
140
139
|
|
|
140
|
+
### Runtime and Platform Support
|
|
141
|
+
|
|
142
|
+
Support tiers describe what this project's CI actually exercises, not what may
|
|
143
|
+
work in an untested environment:
|
|
144
|
+
|
|
145
|
+
- **Parallel support**: CI runs the test suite with multiple workers available.
|
|
146
|
+
- **Unsupported**: the engine/platform combination is not covered by CI and is
|
|
147
|
+
not a project compatibility claim.
|
|
148
|
+
|
|
149
|
+
| Ruby engine/version | Linux | macOS | Windows | Notes |
|
|
150
|
+
|---------------------|-------|-------|---------|-------|
|
|
151
|
+
| MRI 3.1-3.4 | Parallel support | Unsupported | Unsupported | Versioned Ruby workflows run on Linux. |
|
|
152
|
+
| MRI current | Parallel support | Parallel support | Unsupported | Current Ruby workflow covers the declared OS platforms. |
|
|
153
|
+
| MRI head | Parallel support | Unsupported | Unsupported | CI is allowed to fail while Ruby is in development. |
|
|
154
|
+
| JRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Engine workflows run on Linux; macOS and Windows are not exercised by CI. |
|
|
155
|
+
| TruffleRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Never shipped a Windows build (zero Windows assets across 66 releases scanned 2026-10-10); setup-ruby hard-fails ([source](https://github.com/ruby/setup-ruby/blob/master/README.md)) |
|
|
156
|
+
|
|
141
157
|
### Federated DVCS
|
|
142
158
|
|
|
143
159
|
<details markdown="1">
|
|
@@ -368,6 +384,43 @@ count at the number of discovered test groups.
|
|
|
368
384
|
Known coverage formatter chatter remains collapsed into the concise coverage
|
|
369
385
|
summary.
|
|
370
386
|
|
|
387
|
+
### Stall watchdog
|
|
388
|
+
|
|
389
|
+
If the worker message queue goes silent — every worker alive but none
|
|
390
|
+
producing example/group messages — a run can otherwise hang until the CI
|
|
391
|
+
provider kills the job (GitHub Actions: 6 hours).
|
|
392
|
+
|
|
393
|
+
`TURBO_TESTS2_WATCHDOG_SECONDS=N` (integer, `0` = disabled) bounds that
|
|
394
|
+
silence. **Default is `0` (disabled) in 3.x.** In 4.0 the default becomes
|
|
395
|
+
`900` and the kill behavior is always on.
|
|
396
|
+
|
|
397
|
+
When the watchdog fires it kills the remaining worker processes, prints the
|
|
398
|
+
unfinished groups and worker pids, and fails the run.
|
|
399
|
+
|
|
400
|
+
Setting it:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
TURBO_TESTS2_WATCHDOG_SECONDS=900 bundle exec turbo_tests2
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Notes:
|
|
407
|
+
|
|
408
|
+
- The clock measures **silence across all workers**, not per-test duration.
|
|
409
|
+
In parallel lanes any other worker finishing an example keeps the run
|
|
410
|
+
alive; only serial lanes (`TURBO_TESTS2_MAX_PROCESSES=1`) can trip on a
|
|
411
|
+
single long test. Raise the value there if you have legitimately long,
|
|
412
|
+
silent tests.
|
|
413
|
+
- CI jobs that hang despite the watchdog will still hit the provider
|
|
414
|
+
limit; also set `timeout-minutes` on the CI job. Locally, an outer
|
|
415
|
+
supervisor (process watcher, container timeout) plays the same role.
|
|
416
|
+
- When the watchdog is disabled (`0`), a 900s silence prints a one-time
|
|
417
|
+
deprecation notice describing the 4.0 default change and both options
|
|
418
|
+
(adopt the kill via `TURBO_TESTS2_WATCHDOG_SECONDS`, or explicitly opt out
|
|
419
|
+
with `0`). The notice is provider-neutral: it warns that with the
|
|
420
|
+
watchdog off, whatever outer process watcher exists — a CI job timeout,
|
|
421
|
+
a container orchestrator, or a local supervisor — is what will eventually
|
|
422
|
+
end a hung run.
|
|
423
|
+
|
|
371
424
|
`turbo_tests2` supports custom formatter such as Fuubar, but you might need to require it:
|
|
372
425
|
|
|
373
426
|
```bash
|
|
@@ -734,8 +787,6 @@ Thanks for RTFM. ☺️
|
|
|
734
787
|
[🚎jruby-9.3-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-9.3.yml
|
|
735
788
|
[🚎jruby-9.4-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-9.4.yml
|
|
736
789
|
[🚎jruby-10.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-10.0.yml
|
|
737
|
-
[🚎truby-22.3-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-22.3.yml
|
|
738
|
-
[🚎truby-23.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-23.0.yml
|
|
739
790
|
[🚎truby-23.1-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-23.1.yml
|
|
740
791
|
[🚎truby-24.2-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-24.2.yml
|
|
741
792
|
[🚎truby-25.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-25.0.yml
|
|
@@ -771,14 +822,11 @@ Thanks for RTFM. ☺️
|
|
|
771
822
|
[💎ruby-3.4i]: https://img.shields.io/badge/Ruby-3.4-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
772
823
|
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
773
824
|
[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
|
|
774
|
-
[💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
775
|
-
[💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
776
825
|
[💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
777
826
|
[💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
778
827
|
[💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
779
828
|
[💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
780
829
|
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
|
781
|
-
[💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
|
|
782
830
|
[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
783
831
|
[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
784
832
|
[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
@@ -811,7 +859,7 @@ Thanks for RTFM. ☺️
|
|
|
811
859
|
[📌gitmoji]: https://gitmoji.dev
|
|
812
860
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
813
861
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
814
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-
|
|
862
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-1.022-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
815
863
|
[🔐security]: https://github.com/galtzo-floss/turbo_tests2/blob/main/SECURITY.md
|
|
816
864
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
817
865
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/turbo_tests/runner.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "json"
|
|
4
|
+
require "timeout"
|
|
4
5
|
require "fileutils"
|
|
5
6
|
require "parallel_tests/rspec/runner"
|
|
6
7
|
require "rspec/core"
|
|
@@ -248,6 +249,12 @@ module TurboTests
|
|
|
248
249
|
@load_time = 0
|
|
249
250
|
@load_count = 0
|
|
250
251
|
@failure_count = 0
|
|
252
|
+
# Deprecation-period default: disabled. In 4.0 the kill behavior
|
|
253
|
+
# becomes the default (TURBO_TESTS2_WATCHDOG_SECONDS=900) and this
|
|
254
|
+
# warning is removed. See README "Stall watchdog".
|
|
255
|
+
@watchdog_seconds = Float(ENV.fetch("TURBO_TESTS2_WATCHDOG_SECONDS", "0"))
|
|
256
|
+
@watchdog_warned = false
|
|
257
|
+
@last_message_monotonic = nil
|
|
251
258
|
|
|
252
259
|
# Supports runtime_log as a top level option,
|
|
253
260
|
# but also nested inside parallel_options
|
|
@@ -725,12 +732,101 @@ module TurboTests
|
|
|
725
732
|
thread.kill.join(FORCE_STOP_JOIN)
|
|
726
733
|
end
|
|
727
734
|
|
|
735
|
+
# Blocks for the next worker message, enforcing a stall watchdog. A
|
|
736
|
+
# worker whose stdout reader and exit-ensuring thread both fail to
|
|
737
|
+
# deliver an exit message (process killed by the OOM killer, forked
|
|
738
|
+
# child wedged in a native call) used to leave handle_messages blocked
|
|
739
|
+
# on the queue forever — CI jobs hung for hours with no diagnostics.
|
|
740
|
+
# On a stall we kill the surviving worker pids, report which groups
|
|
741
|
+
# never finished, and fail the run instead.
|
|
742
|
+
def pop_message_with_watchdog
|
|
743
|
+
# 0 (the default) disables the watchdog: block indefinitely, exactly the
|
|
744
|
+
# pre-watchdog behavior.
|
|
745
|
+
return @messages.pop if @watchdog_seconds <= 0
|
|
746
|
+
|
|
747
|
+
loop do
|
|
748
|
+
timeout = [@watchdog_seconds - (Process.clock_gettime(Process::CLOCK_MONOTONIC) - @last_message_monotonic), 1.0].max
|
|
749
|
+
begin
|
|
750
|
+
message = Timeout.timeout(timeout) { @messages.pop }
|
|
751
|
+
@last_message_monotonic = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
752
|
+
return message
|
|
753
|
+
rescue Timeout::Error
|
|
754
|
+
stall_report = remaining_workers_report
|
|
755
|
+
warn("turbo_tests2: no worker messages for #{@watchdog_seconds}s; killing stalled workers and failing the run")
|
|
756
|
+
warn(stall_report)
|
|
757
|
+
kill_remaining_workers
|
|
758
|
+
@reporter.error_outside_of_examples(
|
|
759
|
+
"turbo_tests2: watchdog fired after #{@watchdog_seconds}s without worker messages; workers killed\n#{stall_report}"
|
|
760
|
+
)
|
|
761
|
+
@error = true
|
|
762
|
+
return {type: "exit", process_id: :watchdog}
|
|
763
|
+
end
|
|
764
|
+
end
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
def remaining_workers_report
|
|
768
|
+
pids = tracked_pids
|
|
769
|
+
live = []
|
|
770
|
+
pids.each do |pid|
|
|
771
|
+
begin
|
|
772
|
+
Process.kill(0, pid)
|
|
773
|
+
live << pid
|
|
774
|
+
rescue
|
|
775
|
+
nil
|
|
776
|
+
end
|
|
777
|
+
end
|
|
778
|
+
lines = ["Workers total: #{@num_processes}; tracked pids: #{pids.inspect}; live: #{live.inspect}"]
|
|
779
|
+
(@tests_in_groups || []).each_with_index do |group, idx|
|
|
780
|
+
lines << "group #{idx + 1}: #{Array(group).join(", ")}" unless group.nil?
|
|
781
|
+
end
|
|
782
|
+
lines.join("\n")
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
def tracked_pids
|
|
786
|
+
path = ParallelTests.pid_file_path
|
|
787
|
+
return [] unless path && File.file?(path)
|
|
788
|
+
|
|
789
|
+
File.read(path).lines.map { |l| l.strip.to_i }.reject(&:zero?)
|
|
790
|
+
rescue
|
|
791
|
+
[]
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
def kill_remaining_workers
|
|
795
|
+
tracked_pids.each do |pid|
|
|
796
|
+
begin
|
|
797
|
+
Process.kill("KILL", pid)
|
|
798
|
+
rescue
|
|
799
|
+
nil
|
|
800
|
+
end
|
|
801
|
+
end
|
|
802
|
+
end
|
|
803
|
+
|
|
728
804
|
def handle_messages
|
|
729
805
|
exited_process_ids = {}
|
|
730
806
|
process_count = @tests_in_groups&.size || @num_processes
|
|
731
807
|
|
|
808
|
+
# Tests pre-seed @last_message_monotonic to simulate a stall; only
|
|
809
|
+
# initialize it here when unset.
|
|
810
|
+
@last_message_monotonic ||= Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
811
|
+
warned_silence = false
|
|
732
812
|
loop do
|
|
733
|
-
message =
|
|
813
|
+
message = pop_message_with_watchdog
|
|
814
|
+
unless warned_silence
|
|
815
|
+
silence = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @last_message_monotonic
|
|
816
|
+
if silence >= 900
|
|
817
|
+
warn(
|
|
818
|
+
"turbo_tests2: workers have been silent for #{silence.to_i}s. " \
|
|
819
|
+
"In turbo_tests2 4.0 (and now when TURBO_TESTS2_WATCHDOG_SECONDS is set) a stall this long kills the " \
|
|
820
|
+
"remaining workers and fails the run. To adopt the kill now set TURBO_TESTS2_WATCHDOG_SECONDS=900 (or " \
|
|
821
|
+
"another value). To keep waiting indefinitely set TURBO_TESTS2_WATCHDOG_SECONDS=0; be aware that an " \
|
|
822
|
+
"outer process watcher (a CI job timeout, a container orchestrator, or a local supervisor) will then " \
|
|
823
|
+
"be what eventually ends the run, usually without a useful stall report. A single long test only " \
|
|
824
|
+
"trips this in serial lanes (TURBO_TESTS2_MAX_PROCESSES=1); in parallel lanes other workers keep " \
|
|
825
|
+
"messages flowing."
|
|
826
|
+
)
|
|
827
|
+
warned_silence = true
|
|
828
|
+
end
|
|
829
|
+
end
|
|
734
830
|
case message[:type]
|
|
735
831
|
when "example_passed"
|
|
736
832
|
example = FakeExample.from_obj(message[:example])
|
data/lib/turbo_tests/version.rb
CHANGED
|
@@ -4,7 +4,7 @@ module TurboTests
|
|
|
4
4
|
# Version namespace for this gem.
|
|
5
5
|
module Version
|
|
6
6
|
# Current gem version.
|
|
7
|
-
VERSION = "3.2.
|
|
7
|
+
VERSION = "3.2.15"
|
|
8
8
|
end
|
|
9
9
|
# Current gem version exposed at the traditional constant location.
|
|
10
10
|
VERSION = Version::VERSION # Traditional Constant Location
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: turbo_tests2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Illia
|
|
@@ -111,7 +111,7 @@ dependencies:
|
|
|
111
111
|
version: '3.1'
|
|
112
112
|
- - ">="
|
|
113
113
|
- !ruby/object:Gem::Version
|
|
114
|
-
version: 3.1.
|
|
114
|
+
version: 3.1.11
|
|
115
115
|
type: :development
|
|
116
116
|
prerelease: false
|
|
117
117
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -121,7 +121,7 @@ dependencies:
|
|
|
121
121
|
version: '3.1'
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 3.1.
|
|
124
|
+
version: 3.1.11
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: bundler-audit
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -219,7 +219,7 @@ dependencies:
|
|
|
219
219
|
version: '2.0'
|
|
220
220
|
- - ">="
|
|
221
221
|
- !ruby/object:Gem::Version
|
|
222
|
-
version: 2.0.
|
|
222
|
+
version: 2.0.24
|
|
223
223
|
type: :development
|
|
224
224
|
prerelease: false
|
|
225
225
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -229,7 +229,7 @@ dependencies:
|
|
|
229
229
|
version: '2.0'
|
|
230
230
|
- - ">="
|
|
231
231
|
- !ruby/object:Gem::Version
|
|
232
|
-
version: 2.0.
|
|
232
|
+
version: 2.0.24
|
|
233
233
|
- !ruby/object:Gem::Dependency
|
|
234
234
|
name: ruby-progressbar
|
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -316,10 +316,10 @@ licenses:
|
|
|
316
316
|
- MIT
|
|
317
317
|
metadata:
|
|
318
318
|
homepage_uri: https://turbo-tests2.galtzo.com
|
|
319
|
-
source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.
|
|
320
|
-
changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.
|
|
319
|
+
source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.15
|
|
320
|
+
changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.15/CHANGELOG.md
|
|
321
321
|
bug_tracker_uri: https://github.com/galtzo-floss/turbo_tests2/issues
|
|
322
|
-
documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.
|
|
322
|
+
documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.15
|
|
323
323
|
funding_uri: https://github.com/sponsors/pboling
|
|
324
324
|
wiki_uri: https://github.com/galtzo-floss/turbo_tests2/wiki
|
|
325
325
|
news_uri: https://www.railsbling.com/tags/turbo_tests2
|
metadata.gz.sig
CHANGED
|
Binary file
|