parallel_tests 5.3.0 → 5.3.1
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 +13 -7
- data/lib/parallel_tests/cli.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: 976016bff736bf3c0a3318b375b57575596a97185e25e5991c1e4bf3853a359f
|
4
|
+
data.tar.gz: 970d5aa2f19a5166ce304d686681583ba20990439893e82c59926453f7d32277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc814265ca73b3ced92dad469fe94b42d9068aa29cc1ff218a74c920ef3d7c286eef27d6864b555852de6257cd2d041d801373a30c81936181bd5a7e612e672
|
7
|
+
data.tar.gz: feb60ffbb3b67da7990e406471bd4a8f6b4144453bc307bf33fdeca62111ed3744ca3a1a4e0fad2a80064e6db441aa68b18fb076d86586d8768d98a4f68ddbd3
|
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
|
```
|
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
|
|
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.3.
|
4
|
+
version: 5.3.1
|
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-07-24 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.3.
|
73
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.3.
|
74
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.3.
|
72
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.3.1/CHANGELOG.md
|
73
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.3.1/Readme.md
|
74
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.3.1
|
75
75
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
76
76
|
rubygems_mfa_required: 'true'
|
77
77
|
post_install_message:
|