parallel_tests 5.3.0 → 5.4.0
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
- data/Readme.md +15 -7
- data/lib/parallel_tests/cli.rb +1 -1
- data/lib/parallel_tests/tasks.rb +1 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e291b4184f32301b51269a28e356e8047598be82dfb0549ef40fbe96a0538c1f
|
4
|
+
data.tar.gz: a8f8b7d081348692c324842fc31c1678a4cc91383aefc5f03bc008206c51ae75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc7c9e41c2f81f01b4d4fee20287d0fb2c7ec3eff5262fe8039b4d9c8421a50778e358e1fccaca3393c4e4b7c769c3013f352262c047df0556ce2e3aa0d91fe0
|
7
|
+
data.tar.gz: e0d5de320982072fb9ac14b5b6f25f055853d77b9c11d782cff4c63e8037513dbff4959cef02e14ab05dd632e2e7168265fabe2e69bc48ebc28590eeff26e325
|
data/Readme.md
CHANGED
@@ -101,17 +101,23 @@ require "parallel_tests"
|
|
101
101
|
|
102
102
|
# preparation:
|
103
103
|
# affected by race-condition: first process may boot slower than the second
|
104
|
-
#
|
105
|
-
|
104
|
+
# the Process.ppid will be the pod of the process that started the parallel tests
|
105
|
+
# when not using TEST_ENV_NUMBER we use a unique file per process because ppid would be the users shell
|
106
|
+
done = "/tmp/parallel-setup-done-#{ENV['TEST_ENV_NUMBER'] ? Process.ppid : Process.pid}"
|
107
|
+
if ParallelTests.first_process?
|
108
|
+
do_something
|
109
|
+
File.write done, "true"
|
110
|
+
else
|
111
|
+
sleep 0.1 until File.exist?(done)
|
112
|
+
end
|
106
113
|
|
107
114
|
# cleanup:
|
108
|
-
# last_process?
|
109
|
-
ParallelTests.last_process? ? do_something : sleep(1)
|
110
|
-
|
115
|
+
# could also use last_process? but that is just the last process to start, not the last to finish
|
111
116
|
at_exit do
|
112
117
|
if ParallelTests.first_process?
|
113
|
-
|
114
|
-
|
118
|
+
File.unlink done
|
119
|
+
ParallelTests.wait_for_other_processes_to_finish
|
120
|
+
undo_something
|
115
121
|
end
|
116
122
|
end
|
117
123
|
```
|
@@ -354,6 +360,7 @@ TIPS
|
|
354
360
|
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
|
355
361
|
- `export PARALLEL_TEST_PROCESSORS=13` to override default processor count
|
356
362
|
- `export PARALLEL_TEST_MULTIPLY_PROCESSES=.5` to override default processor multiplier
|
363
|
+
- `export PARALLEL_RAILS_ENV=environment_name` to override the default `test` environment
|
357
364
|
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
|
358
365
|
- [Spring] Add the [spring-commands-parallel-tests](https://github.com/DocSpring/spring-commands-parallel-tests) gem to your `Gemfile` to get `parallel_tests` working with Spring.
|
359
366
|
- `--first-is-1` will make the first environment be `1`, so you can test while running your full suite.<br/>
|
@@ -468,6 +475,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
468
475
|
- [hatsu](https://github.com/hatsu38)
|
469
476
|
- [Mark Huk](https://github.com/vimutter)
|
470
477
|
- [Johannes Vetter](https://github.com/johvet)
|
478
|
+
- [Michel Filipe](https://github.com/mfilipe)
|
471
479
|
|
472
480
|
[Michael Grosser](http://grosser.it)<br/>
|
473
481
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -15,7 +15,7 @@ module ParallelTests
|
|
15
15
|
ENV['DISABLE_SPRING'] ||= '1'
|
16
16
|
|
17
17
|
num_processes = ParallelTests.determine_number_of_processes(options[:count])
|
18
|
-
num_processes = (num_processes * ParallelTests.determine_multiple(options[:
|
18
|
+
num_processes = (num_processes * ParallelTests.determine_multiple(options[:multiply_processes])).round
|
19
19
|
|
20
20
|
options[:first_is_1] ||= first_is_1?
|
21
21
|
|
data/lib/parallel_tests/tasks.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -69,9 +69,9 @@ licenses:
|
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
71
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.
|
73
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.
|
74
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.
|
72
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.4.0/CHANGELOG.md
|
73
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.4.0/Readme.md
|
74
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.4.0
|
75
75
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
76
76
|
rubygems_mfa_required: 'true'
|
77
77
|
post_install_message:
|