diff --git a/test/new_relic/agent/pipe_channel_manager_test.rb b/test/new_relic/agent/pipe_channel_manager_test.rb index e9f6cc5667..306c2550da 100644 --- a/test/new_relic/agent/pipe_channel_manager_test.rb +++ b/test/new_relic/agent/pipe_channel_manager_test.rb @@ -79,6 +79,8 @@ def test_listener_merges_transaction_traces end def test_listener_merges_error_traces + skip_for_ruby_2_5_9_and_rails_6_x + sampler = NewRelic::Agent.agent.error_collector sampler.notice_error(Exception.new('message'), :uri => '/myurl/', :metric => 'path', :referer => 'test_referer', @@ -130,6 +132,8 @@ def test_listener_merges_analytics_events end def test_listener_merges_error_events + skip_for_ruby_2_5_9_and_rails_6_x + error_event_aggregator = NewRelic::Agent.agent.error_collector.error_event_aggregator reset_lifetime_counts!(error_event_aggregator) @@ -360,4 +364,12 @@ def reset_lifetime_counts!(container) buffer.instance_variable_set(:@captured_lifetime, 0) buffer.instance_variable_set(:@seen_lifetime, 0) end + + def skip_for_ruby_2_5_9_and_rails_6_x + # TODO: MAJOR VERSION - remove this method and its calls when Ruby 2.5 is no longer supported + skip if RUBY_VERSION == '2.5.9' && + defined?(Rails::VERSION::STRING) && + # version string starts with 6.0 or 6.1 + Rails::VERSION::STRING =~ /\A6\.(0|1)/ + end end