Skip to content

Commit

Permalink
Update test calls to reset
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryseed committed Dec 28, 2024
1 parent 89b948a commit 38de12c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/apps/test_support/lib/test_support.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule TestSupport do
def simulate_agent_run(_context) do
reset_config = update(:nr_config, license_key: "dummy_key", harvest_enabled: true)
reset_agent_run = update(:nr_agent_run, trusted_account_key: "190")
send(NewRelic.DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

ExUnit.Callbacks.on_exit(fn ->
reset_config.()
Expand Down
2 changes: 1 addition & 1 deletion test/distributed_trace_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defmodule DistributedTraceTest do
primary_application_id: 1441
)

send(DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

on_exit(fn ->
reset_config.()
Expand Down
2 changes: 1 addition & 1 deletion test/other_transaction_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule OtherTransactionTest do

setup do
reset_config = TestHelper.update(:nr_config, license_key: "dummy_key", harvest_enabled: true)
send(NewRelic.DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

on_exit(fn ->
reset_config.()
Expand Down
2 changes: 1 addition & 1 deletion test/span_event_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule SpanEventTest do
reset_agent_run = TestHelper.update(:nr_agent_run, trusted_account_key: "190")
reset_config = TestHelper.update(:nr_config, license_key: "dummy_key", harvest_enabled: true)

send(DistributedTrace.BackoffSampler, :reset)
DistributedTrace.BackoffSampler.reset()

on_exit(fn ->
reset_agent_run.()
Expand Down
2 changes: 1 addition & 1 deletion test/support/test_helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ defmodule TestHelper do
def simulate_agent_run(_context) do
reset_config = TestHelper.update(:nr_config, license_key: "dummy_key", harvest_enabled: true)
reset_agent_run = TestHelper.update(:nr_agent_run, trusted_account_key: "190")
send(NewRelic.DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

ExUnit.Callbacks.on_exit(fn ->
reset_config.()
Expand Down
3 changes: 1 addition & 2 deletions test/transaction_trace_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ defmodule TransactionTraceTest do
alias NewRelic.Transaction.Trace

setup do
send(NewRelic.DistributedTrace.BackoffSampler, :reset)
TestHelper.restart_harvest_cycle(Collector.Metric.HarvestCycle)
TestHelper.restart_harvest_cycle(Collector.TransactionTrace.HarvestCycle)
TestHelper.restart_harvest_cycle(Collector.SpanEvent.HarvestCycle)
send(NewRelic.DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

on_exit(fn ->
TestHelper.pause_harvest_cycle(Collector.Metric.HarvestCycle)
Expand Down
2 changes: 1 addition & 1 deletion test/wc3_trace_context_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule W3CTraceContextTest do

reset_config = TestHelper.update(:nr_config, license_key: "dummy_key", harvest_enabled: true)

send(DistributedTrace.BackoffSampler, :reset)
NewRelic.DistributedTrace.BackoffSampler.reset()

on_exit(fn ->
reset_agent_run.()
Expand Down

0 comments on commit 38de12c

Please sign in to comment.