@@ -373,16 +373,21 @@ def assert_received_and_errored
373
373
context 'line probe received targeting loaded code not in code tracker' do
374
374
let ( :probe_spec ) do
375
375
{ 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
+ } }
377
378
end
378
379
379
380
before do
380
- Object . send ( :remove_const , :InstrumentationIntegrationTestClass ) rescue nil
381
+ begin
382
+ Object . send ( :remove_const , :InstrumentationIntegrationTestClass )
383
+ rescue
384
+ nil
385
+ end
381
386
# Files loaded via 'load' do not get added to $LOADED_FEATURES,
382
387
# use 'require'.
383
388
# Note that the other tests use 'load' because they want the
384
389
# code to always be loaded.
385
- require_relative 'instrumentation_integration_test_class.rb '
390
+ require_relative 'instrumentation_integration_test_class'
386
391
expect ( $LOADED_FEATURES. detect do |path |
387
392
File . basename ( path ) == 'instrumentation_integration_test_class.rb'
388
393
end ) . to be_truthy
@@ -396,8 +401,7 @@ def assert_received_and_errored
396
401
it 'instruments code and adds probe to installed list' do
397
402
expect_lazy_log_many ( logger , :debug ,
398
403
/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/ , )
401
405
402
406
do_rc ( expect_hook : false )
403
407
assert_received_and_errored
0 commit comments