Skip to content

Commit

Permalink
test: do NOT trap exits in tests
Browse files Browse the repository at this point in the history
This make test more flaky, is harmful to the test, and in general is bad
practice.
  • Loading branch information
hauleth committed Nov 27, 2024
1 parent 2683164 commit 57d57be
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test/integration/proxy_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ defmodule Supavisor.Integration.ProxyTest do
end

test "the wrong password" do
Process.flag(:trap_exit, true)
db_conf = Application.get_env(:supavisor, Repo)

url =
Expand Down Expand Up @@ -216,7 +215,6 @@ defmodule Supavisor.Integration.ProxyTest do
end

test "limit client connections" do
Process.flag(:trap_exit, true)
db_conf = Application.get_env(:supavisor, Repo)

connection_opts = [
Expand All @@ -240,7 +238,6 @@ defmodule Supavisor.Integration.ProxyTest do
end

test "change role password", %{origin: origin} do
Process.flag(:trap_exit, true)
db_conf = Application.get_env(:supavisor, Repo)

conn = fn pass ->
Expand Down Expand Up @@ -270,7 +267,6 @@ defmodule Supavisor.Integration.ProxyTest do
end

test "invalid characters in user or db_name" do
Process.flag(:trap_exit, true)
db_conf = Application.get_env(:supavisor, Repo)

url =
Expand All @@ -289,7 +285,6 @@ defmodule Supavisor.Integration.ProxyTest do
end

# test "max_pools limit" do
# Process.flag(:trap_exit, true)
# db_conf = Application.get_env(:supavisor, Repo)
# port = Application.get_env(:supavisor, :proxy_port_transaction)

Expand Down Expand Up @@ -343,7 +338,6 @@ defmodule Supavisor.Integration.ProxyTest do
# end

test "active_count doesn't block" do
Process.flag(:trap_exit, true)
db_conf = Application.get_env(:supavisor, Repo)
port = Application.get_env(:supavisor, :proxy_port_session)

Expand Down

0 comments on commit 57d57be

Please sign in to comment.