Skip to content

Commit 91a1c3a

Browse files
committed
standard
1 parent 1b63dee commit 91a1c3a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: spec/datadog/di/integration/everything_from_remote_config_spec.rb

+9-5
Original file line numberDiff line numberDiff line change
@@ -373,16 +373,21 @@ def assert_received_and_errored
373373
context 'line probe received targeting loaded code not in code tracker' do
374374
let(:probe_spec) do
375375
{id: '11', name: 'bar', type: 'LOG_PROBE', where: {
376-
sourceFile: 'instrumentation_integration_test_class.rb', lines: [22]}}
376+
sourceFile: 'instrumentation_integration_test_class.rb', lines: [22]
377+
}}
377378
end
378379

379380
before do
380-
Object.send(:remove_const, :InstrumentationIntegrationTestClass) rescue nil
381+
begin
382+
Object.send(:remove_const, :InstrumentationIntegrationTestClass)
383+
rescue
384+
nil
385+
end
381386
# Files loaded via 'load' do not get added to $LOADED_FEATURES,
382387
# use 'require'.
383388
# Note that the other tests use 'load' because they want the
384389
# code to always be loaded.
385-
require_relative 'instrumentation_integration_test_class.rb'
390+
require_relative 'instrumentation_integration_test_class'
386391
expect($LOADED_FEATURES.detect do |path|
387392
File.basename(path) == 'instrumentation_integration_test_class.rb'
388393
end).to be_truthy
@@ -396,8 +401,7 @@ def assert_received_and_errored
396401
it 'instruments code and adds probe to installed list' do
397402
expect_lazy_log_many(logger, :debug,
398403
/received probe from RC:/,
399-
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,
400-
)
404+
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,)
401405

402406
do_rc(expect_hook: false)
403407
assert_received_and_errored

0 commit comments

Comments
 (0)