We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05ca083 commit 56393c4Copy full SHA for 56393c4
test/realtime/tenants/connect_test.exs
@@ -56,10 +56,15 @@ defmodule Realtime.Tenants.ConnectTest do
56
test "if no users are connected to a tenant channel, stop the connection", %{
57
tenant: %{external_id: tenant_id}
58
} do
59
- Connect.lookup_or_start_connection(tenant_id, check_connected_user_interval: 100)
+ Connect.lookup_or_start_connection(tenant_id, check_connected_user_interval: 600)
60
+ assert {_, %{conn: _}} = :syn.lookup(Connect, tenant_id)
61
62
+ # Not enough time has passed, connection still alive
63
+ :timer.sleep(100)
64
assert {_, %{conn: _}} = :syn.lookup(Connect, tenant_id)
- :timer.sleep(300)
65
+
66
+ # Enough time has passed, connection stopped
67
+ :timer.sleep(1000)
68
assert :undefined = :syn.lookup(Connect, tenant_id)
69
end
70
0 commit comments