Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
dixent committed May 10, 2024
1 parent 9609fa1 commit d49cd45
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/elastic_apm/spies/sidekiq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ def perform
transaction = ElasticAPM.start_transaction 'Test'
ElasticAPM.end_transaction

fake_trace_context = transaction.trace_context

allow_any_instance_of(ElasticAPM::Spies::SidekiqSpy::Middleware).to receive(:get_trace_context_from).and_return(
ElasticAPM::TraceContext.parse(
metadata: {
'traceparent' => fake_trace_context.traceparent.to_header,
'tracestate' => fake_trace_context.tracestate.to_header
}
)
fake_trace_context = ElasticAPM::TraceContext.parse(
metadata: {
'traceparent' => transaction.trace_context.traceparent.to_header,
'tracestate' => transaction.trace_context.tracestate.to_header
}
)

allow_any_instance_of(ElasticAPM::Spies::SidekiqSpy::Middleware).to(
receive(:get_trace_context_from).and_return(fake_trace_context)
)

Sidekiq::Testing.inline! do
Expand Down

0 comments on commit d49cd45

Please sign in to comment.