Skip to content

Commit

Permalink
Merge pull request #2913 from newrelic/jruby_test_failure
Browse files Browse the repository at this point in the history
Fix for Jruby test failure that needs config enabled
  • Loading branch information
tannalynn authored Oct 14, 2024
2 parents 63eb706 + ba31837 commit 4eec4f9
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions test/new_relic/agent/configuration/manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,20 +492,22 @@ def test_apply_transformations_reraises_errors
end

def test_auto_determined_values_stay_cached
name = :knockbreck_manse
with_config(:'security.agent.enabled' => true) do
name = :knockbreck_manse

DependencyDetection.defer do
named(name)
executes { use_prepend? }
end
DependencyDetection.defer do
named(name)
executes { use_prepend? }
end

key = :"instrumentation.#{name}"
with_config(key => 'auto') do
DependencyDetection.detect!
key = :"instrumentation.#{name}"
with_config(key => 'auto') do
DependencyDetection.detect!

@manager.replace_or_add_config(ServerSource.new({}))
@manager.replace_or_add_config(ServerSource.new({}))

assert_equal :prepend, @manager.instance_variable_get(:@cache)[key]
assert_equal :prepend, @manager.instance_variable_get(:@cache)[key]
end
end
end

Expand Down

0 comments on commit 4eec4f9

Please sign in to comment.