airbrake-ruby 4.14.0-java → 4.14.1-java

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: 47137b5594e838edb0d68d5121a8a7f4fddc04ef90503c31d2cfe1f4a14e7efc
4
- data.tar.gz: 743b3190115223bf043cf8ecf7e9b5a8bb32b40206c146967d86489514247d99
3
+ metadata.gz: ca9756d562f734886cca17fb7e03d66ffd98dab8241b34ff5fb4b4dc80c1ee31
4
+ data.tar.gz: 6e19717eef99f7446b8f2e50e79e2eea6787d2b283c0a291821f09ab5e227a8f
5
5
  SHA512:
6
- metadata.gz: 31b0eb06f2c8fadc1b6845e80af5f41bad55169e1e34830f5536761767c866bd181441f1827fba1ccc78434522c25c556ad38429f83e225e2c6ecc79002ab5cc
7
- data.tar.gz: b7ed80303a34c3b0f58b51037063428384b4680273729f88062fd22146fcccfc55989a0f77ddc88a502859d234661a1243853d98fc1abc05f951a703962ec6af
6
+ metadata.gz: 2f2b98f5d2d1427782a8ff84038589ed93765880c13b672b9e14d6ed159013d78436f0b3026649054cfee8098a84768d6cf6039be4598000960a64747c9da057
7
+ data.tar.gz: 28b983d5c3b2b3e7d2a31c5429ffb72b06103569444411c5e7231c76ce308ef143140f40d215401b178aa2022f912914ef7c3f7b14ec4f01c75398342dda97c0
@@ -83,6 +83,7 @@ module Airbrake
83
83
 
84
84
  if @pid != Process.pid && @workers.list.empty?
85
85
  @pid = Process.pid
86
+ @workers = ThreadGroup.new
86
87
  spawn_workers
87
88
  end
88
89
 
@@ -2,5 +2,5 @@
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
- AIRBRAKE_RUBY_VERSION = '4.14.0'.freeze
5
+ AIRBRAKE_RUBY_VERSION = '4.14.1'.freeze
6
6
  end
@@ -85,11 +85,31 @@ RSpec.describe Airbrake::ThreadPool do
85
85
  expect(subject).not_to have_workers
86
86
  end
87
87
 
88
- it "respawns workers on fork()", skip: %w[jruby].include?(RUBY_ENGINE) do
89
- pid = fork { expect(subject).to have_workers }
90
- Process.wait(pid)
91
- subject.close
92
- expect(subject).not_to have_workers
88
+ describe "forking behavior" do
89
+ before do
90
+ skip('fork() is unsupported on JRuby') if %w[jruby].include?(RUBY_ENGINE)
91
+ unless Process.respond_to?(:last_status)
92
+ skip('Process.last_status is unsupported on this Ruby')
93
+ end
94
+ end
95
+
96
+ it "respawns workers on fork()" do
97
+ pid = fork { expect(subject).to have_workers }
98
+ Process.wait(pid)
99
+ subject.close
100
+
101
+ expect(Process.last_status).to be_success
102
+ expect(subject).not_to have_workers
103
+ end
104
+
105
+ it "ensures that a new thread group is created per process" do
106
+ subject << 1
107
+ pid = fork { subject.has_workers? }
108
+ Process.wait(pid)
109
+ subject.close
110
+
111
+ expect(Process.last_status).to be_success
112
+ end
93
113
  end
94
114
  end
95
115
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.14.1
5
5
  platform: java
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-10 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree-jruby