Skip to content

Commit

Permalink
test: verify active_count increases after executing queries (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 authored Nov 14, 2024
1 parent 7ec3627 commit f054c35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integration/proxy_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ defmodule Supavisor.Integration.ProxyTest do
id = {{:single, @tenant}, db_conf[:username], :session, db_conf[:database], nil}
[{client_pid, _}] = Registry.lookup(Supavisor.Registry.TenantClients, id)

assert {_, %{active_count: 1}} = :sys.get_state(client_pid)
P.SimpleConnection.call(pid, {:query, "select 1;"})
{_, %{active_count: active_count}} = :sys.get_state(client_pid)
assert active_count >= 1

Enum.each(0..200, fn _ ->
P.SimpleConnection.call(pid, {:query, "select 1;"})
Expand Down

0 comments on commit f054c35

Please sign in to comment.