Skip to content

Commit e8b607f

Browse files
committed
fix tests
1 parent 298da3c commit e8b607f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

spec/datadog/di/integration/everything_from_remote_config_spec.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def target_method
184184
status: 'ERROR',
185185
},
186186
},
187-
message: 'Instrumentation for probe 11 failed: File matching probe path (instrumentation_integration_test_class.rb) was loaded and is not in code tracker registry: /home/w/apps/dd-trace-rb/spec/datadog/di/integration/instrumentation_integration_test_class.rb',
187+
message: /Instrumentation for probe 11 failed: File matching probe path \(instrumentation_integration_test_class.rb\) was loaded and is not in code tracker registry:/,
188188
service: 'rspec',
189189
timestamp: Integer,
190190
}
@@ -373,21 +373,16 @@ 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]
377-
}}
376+
sourceFile: 'instrumentation_integration_test_class.rb', lines: [22]}}
378377
end
379378

380379
before do
381-
begin
382-
Object.send(:remove_const, :InstrumentationIntegrationTestClass)
383-
rescue
384-
nil
385-
end
380+
Object.send(:remove_const, :InstrumentationIntegrationTestClass) rescue nil
386381
# Files loaded via 'load' do not get added to $LOADED_FEATURES,
387382
# use 'require'.
388383
# Note that the other tests use 'load' because they want the
389384
# code to always be loaded.
390-
require_relative 'instrumentation_integration_test_class'
385+
require_relative 'instrumentation_integration_test_class.rb'
391386
expect($LOADED_FEATURES.detect do |path|
392387
File.basename(path) == 'instrumentation_integration_test_class.rb'
393388
end).to be_truthy
@@ -401,7 +396,8 @@ def assert_received_and_errored
401396
it 'instruments code and adds probe to installed list' do
402397
expect_lazy_log_many(logger, :debug,
403398
/received probe from RC:/,
404-
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,)
399+
/error processing probe configuration:.*File matching probe path.*was loaded and is not in code tracker registry/,
400+
)
405401

406402
do_rc(expect_hook: false)
407403
assert_received_and_errored

0 commit comments

Comments
 (0)