我有使用Ecto和Postgrex的a library (Postgrex只在测试中使用)。
从Ecto 1升级到Ecto 2后,测试套件开始显示以下错误:
$ mix test
Compiling 4 files (.ex)
Generated ectoo app
** (EXIT from #PID<0.46.0>) shutdown: failed to start child: DBConnection.Ownership.Manager
** (EXIT) exited in: GenServer.call(DBConnection.Ownership.PoolSupervisor, {:start_child, [#PID<0.175.0>, Postgrex.Protocol, [pool: DBConnection.Poolboy, types: true, hostname: "localhost", types: true, otp_app: :ectoo, repo: Ectoo.Repo, adapter: Ecto.Adapters.Postgres, database: "ectoo_test", username: "henrik", pool_timeout: 5000, timeout: 15000, adapter: Ecto.Adapters.Postgres, database: "ectoo_test", username: "henrik", extensions: [{Ecto.Adapters.Postgres.DateTime, []}, {Postgrex.Extensions.JSON, [library: nil]}], port: 5432]]}, :infinity)
** (EXIT) no process有什么想法吗?
发布于 2016-06-24 17:30:49
我通过确保测试运行时postgrex应用程序正在运行来修复这个问题。
在mix.exs中:
def application do
[applications: applications(Mix.env)]
end
defp applications(:test), do: [:logger, :postgrex]
defp applications(_), do: [:logger]https://stackoverflow.com/questions/38010058
复制相似问题