newrelic_rpm 3.6.0.78 → 3.6.0.83

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- !�3��ԑ#$��q{�+�ŎtjC����3�(��O���H6KDHe ��b0��].}�2���`�TrIt��"��Q���}#Ŷ��Pq� ��w5Z&n��]N�X�)ULxH��e�L-)J ��l��>f��1@ͮ18#�t@j�9��u{��38���U�`&*�uaL<�^~a"��T{;���s$9 ���U ~PD���
1
+ :lח��*W'��Z�?��CG����Ug����~�!��я�?茆�ƣHZ��/0|�Q1�%���=�b���k�_#=}>c�* ]� �������@=�%Tګ�t��v�,�&���ڈ��5��� ��9^���*���Z!m���/�:#�sF��S�TJ��S�+���(3NP~����xO�+[��|Jz����Jݘצ�6H��������{v��~�p@hm4s1����ĤiyQ�
@@ -1016,6 +1016,9 @@ module NewRelic
1016
1016
 
1017
1017
  check_for_agent_commands
1018
1018
  end
1019
+ rescue EOFError => e
1020
+ ::NewRelic::Agent.logger.warn("EOFError after #{Time.now - now}s when transmitting data to New Relic Service.")
1021
+ ::NewRelic::Agent.logger.debug(e)
1019
1022
  rescue => e
1020
1023
  retry_count ||= 0
1021
1024
  retry_count += 1
@@ -316,7 +316,7 @@ module NewRelic
316
316
  response = http.request(request)
317
317
  end
318
318
  rescue Timeout::Error
319
- ::NewRelic::Agent.logger.warn "Timed out trying to post data to New Relic (timeout = #{@request_timeout} seconds)" unless @request_timeout < 30
319
+ ::NewRelic::Agent.logger.warn "Timed out trying to post data to New Relic (timeout = #{@request_timeout} seconds)"
320
320
  raise
321
321
  end
322
322
  case response
@@ -3,12 +3,15 @@ suite_condition("Resque tests not compatible with 1.8.6, JRuby") do
3
3
  end
4
4
 
5
5
  gemfile <<-RB
6
- gem 'resque'
6
+ gem 'resque', '1.23.0'
7
+ gem 'json'
8
+ gem 'rake'
9
+ RB
10
+
11
+ gemfile <<-RB
12
+ gem 'resque', '~>1.24.1'
7
13
  gem 'json'
8
14
  gem 'rake'
9
- if (RUBY_PLATFORM == 'java')
10
- gem "jruby-openssl"
11
- end
12
15
  RB
13
16
 
14
17
  before_suite do
@@ -20,5 +23,3 @@ end
20
23
  after_suite do
21
24
  system("redis-cli -p #{ENV["NEWRELIC_MULTIVERSE_REDIS_PORT"]} shutdown")
22
25
  end
23
-
24
- execute_mode 'spawn'
@@ -1,8 +1,3 @@
1
1
  require File.join(File.dirname(__FILE__), 'resque_setup')
2
2
  require 'resque/tasks'
3
3
 
4
- task "resque:setup" do
5
- if ENV['BROKEN_AFTER_FORK']
6
- Resque.before_fork = Proc.new { 'doot de doo' }
7
- end
8
- end
@@ -45,7 +45,7 @@ class ResqueTest < Test::Unit::TestCase
45
45
  end
46
46
 
47
47
  def start_worker_child(env_vars=nil)
48
- worker_cmd = "#{env_vars} QUEUE=* bundle exec rake resque:work"
48
+ worker_cmd = "#{env_vars} QUEUE=* TERM_CHILD=1 bundle exec rake resque:work"
49
49
  @worker_pid = Process.fork
50
50
  Process.exec(worker_cmd) if @worker_pid.nil?
51
51
  end
@@ -94,7 +94,12 @@ class ResqueTest < Test::Unit::TestCase
94
94
  def wait_for_jobs
95
95
  time_for_jobs = 5
96
96
  begin
97
- Timeout.timeout(time_for_jobs) { sleep(0.1) until Resque.info[:processed] == JOB_COUNT }
97
+ Timeout.timeout(time_for_jobs) do
98
+ loop do
99
+ break if Resque.info[:processed] == JOB_COUNT
100
+ sleep(0.1)
101
+ end
102
+ end
98
103
  rescue Timeout::Error => err
99
104
  raise err.exception("waiting #{time_for_jobs}s for completion of #{JOB_COUNT} jobs")
100
105
  end
@@ -132,15 +137,6 @@ class ResqueTest < Test::Unit::TestCase
132
137
  assert_metric_and_call_count('OtherTransaction/ResqueJob/all', JOB_COUNT)
133
138
  end
134
139
 
135
- def test_log_properly_when_fork_callbacks_are_broken
136
- log_path = File.join(File.dirname(__FILE__), 'agent.log', 'newrelic_agent.log')
137
- File.delete(log_path)
138
-
139
- run_worker(:env_vars => 'BROKEN_AFTER_FORK=true')
140
-
141
- assert File.read(log_path).include?('No communication channel to parent process')
142
- end
143
-
144
140
  if RUBY_VERSION >= '1.9'
145
141
  def test_all_jobs_ran_background
146
142
  run_worker(:background => true)
@@ -69,6 +69,14 @@ module NewRelic
69
69
  @agent.instance_eval { transmit_data }
70
70
  end
71
71
 
72
+ def test_transmit_data_should_handle_eoferror
73
+ @agent.service.stubs(:metric_data).raises(EOFError)
74
+ expects_no_logging(:error)
75
+ expects_logging(:warn, regexp_matches(/EOFError/))
76
+ expects_logging(:debug, is_a(EOFError))
77
+ @agent.instance_eval { transmit_data }
78
+ end
79
+
72
80
  def test_harvest_transaction_traces
73
81
  assert_equal([], @agent.send(:harvest_transaction_traces), 'should return transaction traces')
74
82
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0.78
4
+ version: 3.6.0.83
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -41,7 +41,7 @@ cert_chain:
41
41
  cHUySWFQWE92bTNUOEc0TzZxWnZobkxoL1VpZW4rK0RqOGVGQmVjVFBvTThw
42
42
  VmpLM3BoNQpuL0V3dVpDY0U2Z2h0Q0NNCi0tLS0tRU5EIENFUlRJRklDQVRF
43
43
  LS0tLS0K
44
- date: 2013-03-19 00:00:00.000000000 Z
44
+ date: 2013-04-09 00:00:00.000000000 Z
45
45
  dependencies: []
46
46
  description: ! 'New Relic is a performance management system, developed by New Relic,
47
47
 
metadata.gz.sig CHANGED
Binary file