minitest-parallel_fork 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/minitest/parallel_fork.rb +14 -0
- data/spec/minitest_parallel_fork_example.rb +10 -0
- data/spec/minitest_parallel_fork_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03e48c02a4df6b51494a491f98a873028c7c394a58f3507a5818f7697af70208
|
4
|
+
data.tar.gz: ac75886465a2883f7631f38663ff9c20923492cdc03b58d80a3694dbc6b91430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecb985d07f4b65d0496a4b33b01215e8863882a3a1e6131178285a573305c3a0aab70de56c4759f7b02d491d827f336644fdeb443c4bcdedebb4447187b827be
|
7
|
+
data.tar.gz: ea0eb216c1b9ed8c2edb1ba21b6d8db81a54b307ae5a3a63db99b0fca0e1fb1e8c3ad46d6adb2ae2bb1c6a92de092c20a9045bdf5a4c477bfb52996a4f7e6ae8
|
data/CHANGELOG
CHANGED
@@ -57,6 +57,20 @@ module Minitest
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
data[-1].each do |result|
|
61
|
+
result.failures.each do |failure|
|
62
|
+
if failure.is_a?(Minitest::UnexpectedError)
|
63
|
+
e = failure.exception
|
64
|
+
begin
|
65
|
+
Marshal.dump(e)
|
66
|
+
rescue TypeError
|
67
|
+
failure.exception = RuntimeError.new("Wrapped undumpable exception for: #{e.class}: #{e.message}")
|
68
|
+
failure.exception.set_backtrace(e.backtrace)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
60
74
|
write.write(Marshal.dump(data))
|
61
75
|
write.close
|
62
76
|
end
|
@@ -12,6 +12,10 @@ Minitest.after_parallel_fork do |i|
|
|
12
12
|
print ":child#{i}#{a}"
|
13
13
|
end
|
14
14
|
|
15
|
+
class MyExceptionClass < StandardError
|
16
|
+
attr_reader :something
|
17
|
+
end
|
18
|
+
|
15
19
|
4.times do |i|
|
16
20
|
describe 'minitest/parallel_fork' do
|
17
21
|
parallelize_me! if ENV['MPF_PARALLELIZE_ME']
|
@@ -34,6 +38,12 @@ end
|
|
34
38
|
raise
|
35
39
|
end
|
36
40
|
|
41
|
+
it "should raise exception containing undumpable data" do
|
42
|
+
e = MyExceptionClass.new("error")
|
43
|
+
e.something = Class.new
|
44
|
+
raise e
|
45
|
+
end
|
46
|
+
|
37
47
|
it "should skip" do
|
38
48
|
skip
|
39
49
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
ENV['MT_NO_PLUGINS'] = '1'
|
1
2
|
gem 'minitest'
|
2
3
|
require 'minitest/autorun'
|
3
4
|
|
@@ -17,7 +18,7 @@ describe 'minitest/parallel_fork' do
|
|
17
18
|
time.must_be :<, 4
|
18
19
|
time.must_be :>, 1
|
19
20
|
output.must_match /:parent/
|
20
|
-
output.must_match /
|
21
|
+
output.must_match /20 runs, 8 assertions, 4 failures, 8 errors, 4 skips/
|
21
22
|
4.times do |i|
|
22
23
|
output.must_match /:child#{i}a/
|
23
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-parallel_fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05
|
11
|
+
date: 2018-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|