Skip to content

Commit

Permalink
standard
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Jan 16, 2025
1 parent 1b63dee commit 91a1c3a
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,21 @@ def assert_received_and_errored
context 'line probe received targeting loaded code not in code tracker' do
let(:probe_spec) do
{id: '11', name: 'bar', type: 'LOG_PROBE', where: {
sourceFile: 'instrumentation_integration_test_class.rb', lines: [22]}}
sourceFile: 'instrumentation_integration_test_class.rb', lines: [22]
}}
end

before do
Object.send(:remove_const, :InstrumentationIntegrationTestClass) rescue nil
begin
Object.send(:remove_const, :InstrumentationIntegrationTestClass)
rescue
nil
end
# Files loaded via 'load' do not get added to $LOADED_FEATURES,
# use 'require'.
# Note that the other tests use 'load' because they want the
# code to always be loaded.
require_relative 'instrumentation_integration_test_class.rb'
require_relative 'instrumentation_integration_test_class'
expect($LOADED_FEATURES.detect do |path|
File.basename(path) == 'instrumentation_integration_test_class.rb'
end).to be_truthy
Expand All @@ -396,8 +401,7 @@ def assert_received_and_errored
it 'instruments code and adds probe to installed list' do
expect_lazy_log_many(logger, :debug,
/received probe from RC:/,
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,
)
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,)

do_rc(expect_hook: false)
assert_received_and_errored
Expand Down

0 comments on commit 91a1c3a

Please sign in to comment.