Skip to content

Commit

Permalink
fix: remove Transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
joaothallis authored and rai200890 committed Dec 17, 2020
1 parent 54708e9 commit a9d268b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ config :ecto_job_scheduler, sanitizer: sanitize_fun

config :logger, level: :warn

config :ecto_job_scheduler, EctoJobScheduler.NewRelic.JobInstrumenter,
transaction: TransactionMock,
reporter: ReporterMock
config :ecto_job_scheduler, EctoJobScheduler.NewRelic.JobInstrumenter, reporter: ReporterMock
4 changes: 0 additions & 4 deletions lib/new_relic/job_instrumenter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,4 @@ defmodule EctoJobScheduler.NewRelic.JobInstrumenter do
do:
Application.get_env(:ecto_job_scheduler, __MODULE__)[:reporter] ||
NewRelic.Transaction.Reporter

# FIXME: remove
defp transaction,
do: Application.get_env(:ecto_job_scheduler, __MODULE__)[:transaction] || NewRelic.Transaction
end
5 changes: 0 additions & 5 deletions lib/new_relic/transaction.ex

This file was deleted.

2 changes: 0 additions & 2 deletions test/job_queue_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ defmodule EctoJobScheduler.JobQueueTest do
ReporterMock
|> Mox.expect(:start, fn -> :ok end)
|> Mox.expect(:add_attributes, fn _ -> :ok end)

Mox.expect(TransactionMock, :stop_transaction, fn -> :ok end)
end

%{}
Expand Down
1 change: 0 additions & 1 deletion test/mocks.ex
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Mox.defmock(ReporterMock, for: EctoJobScheduler.NewRelic.Reporter)
Mox.defmock(TransactionMock, for: EctoJobScheduler.NewRelic.TransactionBehaviour)

0 comments on commit a9d268b

Please sign in to comment.