Skip to content

Commit

Permalink
use aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrat555 committed Jan 19, 2021
1 parent c1dfa46 commit 8716709
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions apps/omg/test/omg/state/persistence_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defmodule OMG.State.PersistenceTest do

require OMG.Utxo

alias Ecto.Adapters.SQL.Sandbox
alias OMG.Block
alias OMG.Eth.Configuration
alias OMG.State.Transaction
Expand Down Expand Up @@ -68,8 +69,8 @@ defmodule OMG.State.PersistenceTest do
name: WatcherInfo.Supervisor
)

:ok = Ecto.Adapters.SQL.Sandbox.checkout(OMG.WatcherInfo.DB.Repo)
Ecto.Adapters.SQL.Sandbox.mode(OMG.WatcherInfo.DB.Repo, {:shared, self()})
:ok = Sandbox.checkout(OMG.WatcherInfo.DB.Repo)
Sandbox.mode(OMG.WatcherInfo.DB.Repo, {:shared, self()})

on_exit(fn ->
Application.put_env(:omg_db, :path, nil)
Expand Down
5 changes: 3 additions & 2 deletions apps/omg/test/omg/state_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule OMG.StateTest do

use OMG.DB.Fixtures

alias Ecto.Adapters.SQL.Sandbox
alias OMG.State
alias OMG.TestHelper
alias OMG.Utxo
Expand Down Expand Up @@ -49,8 +50,8 @@ defmodule OMG.StateTest do
name: WatcherInfo.Supervisor
)

:ok = Ecto.Adapters.SQL.Sandbox.checkout(OMG.WatcherInfo.DB.Repo)
Ecto.Adapters.SQL.Sandbox.mode(OMG.WatcherInfo.DB.Repo, {:shared, self()})
:ok = Sandbox.checkout(OMG.WatcherInfo.DB.Repo)
Sandbox.mode(OMG.WatcherInfo.DB.Repo, {:shared, self()})

on_exit(fn ->
(started_apps ++ bus_apps)
Expand Down

0 comments on commit 8716709

Please sign in to comment.