Skip to content

Commit

Permalink
add config to allow test to pass for jruby
Browse files Browse the repository at this point in the history
  • Loading branch information
tannalynn committed Oct 14, 2024
1 parent 63eb706 commit ba31837
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 ba31837

Please sign in to comment.