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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42db9e813710ee5326a0df5f24f4b5deb361cc21372e6a87124008039526cddc
4
- data.tar.gz: e29d3ab12e2559a840a9bf92dd4653f0e98397c0381167c3f1dbb1fc6c7391f7
3
+ metadata.gz: 03e48c02a4df6b51494a491f98a873028c7c394a58f3507a5818f7697af70208
4
+ data.tar.gz: ac75886465a2883f7631f38663ff9c20923492cdc03b58d80a3694dbc6b91430
5
5
  SHA512:
6
- metadata.gz: 4e45f180446e10b90ab9aaa7051261eec1e5c472422a1b5c522f7d58cd44f4f0adef68f2d875f3061c4902662e2ed190208d8448af6d89b6faf78445e132c9dc
7
- data.tar.gz: 5d8b6fecb607917c6bc3940ad758eae573a32c5f5b803f68bddc2e3bada9a50c0668e0ddfdb84d9cd14ee357a53ae6b15cd2ca33c24830cf1b57ded37b92b463
6
+ metadata.gz: ecb985d07f4b65d0496a4b33b01215e8863882a3a1e6131178285a573305c3a0aab70de56c4759f7b02d491d827f336644fdeb443c4bcdedebb4447187b827be
7
+ data.tar.gz: ea0eb216c1b9ed8c2edb1ba21b6d8db81a54b307ae5a3a63db99b0fca0e1fb1e8c3ad46d6adb2ae2bb1c6a92de092c20a9045bdf5a4c477bfb52996a4f7e6ae8
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.1.2 (2018-07-05)
2
+
3
+ * Handle raised exceptions containing unmarshallable data (jeremyevans)
4
+
1
5
  === 1.1.1 (2018-05-07)
2
6
 
3
7
  * Work around marshalling issue when there are failures in *_all hooks when using minitest-hooks (jeremyevans)
@@ -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 /16 runs, 8 assertions, 4 failures, 4 errors, 4 skips/
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.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-07 00:00:00.000000000 Z
11
+ date: 2018-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest