Genserver doesn't consider Ecto Sandbox

Hi again, I add this line top of my test module:

  setup tags do
    :ok = Ecto.Adapters.SQL.Sandbox.checkout(MishkaDatabase.Repo)
    pid = Ecto.Adapters.SQL.Sandbox.start_owner!(MishkaDatabase.Repo, shared: not tags[:async])
    # on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
    :ok
  end

I disabled stop_owner and all the lines of my tests are run without errors and every test is started with a clean db, not like the previous examples

But I wonder, where should I run Ecto.Adapters.SQL.Sandbox.stop_owner(pid) to close this, it is necessary to stop_owner??!! All the example and new project in phoenix and documents which I found say put it after start_owner.
With stop_owner, I have many errors in sub-projects under umbrella. By the way, I removed Ecto.Adapters.SQL.Sandbox.mode(Repo, :manual) from test_helper file, it did not let the another sub-projects start without errors.

it should be noted I can not run test as use ExUnit.Case, async: true, I have error with async

  1) test Happy | Plugin Database (▰˘◡˘▰) delete plugins dependencies with dependencies which exist (MishkaInstallerTest.State.PluginDatabaseTest)
     apps/mishka_installer/test/plugin_manager/state/plugin_database_test.exs:52
     ** (MatchError) no match of right hand side value: {:error, {{:badmatch, {:already, :owner}}, [{Ecto.Adapters.SQL.Sandbox, :"-start_owner!/2-fun-0-", 3, [file: 'lib/ecto/adapters/sql/sandbox.ex', line: 411]}, {Agent.Server, :init, 1, [file: 'lib/agent/server.ex', line: 8]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 423]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 390]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}
     stacktrace:
       (ecto_sql 3.7.2) lib/ecto/adapters/sql/sandbox.ex:403: Ecto.Adapters.SQL.Sandbox.start_owner!/2
       test/plugin_manager/state/plugin_database_test.exs:20: MishkaInstallerTest.State.PluginDatabaseTest.__ex_unit_setup_0/1
       test/plugin_manager/state/plugin_database_test.exs:1: MishkaInstallerTest.State.PluginDatabaseTest.__ex_unit__/2

Any suggestion?
Thank you.


Update

it works when there is just one test, if you have more than one it shows you top error Genserver doesn't consider Ecto Sandbox - #6 by shahryarjb, and you should activate stop_owner, but after activating it, another projects tests have error

I am done :)))