From 0fe6a007584a6ef3c89670583b2d1128de9d6135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jan=20Niemier?= Date: Tue, 12 Nov 2024 10:22:22 +0100 Subject: [PATCH] test: remove unneeded `match?/2` calls and instead use `=` operator --- test/integration/proxy_test.exs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/integration/proxy_test.exs b/test/integration/proxy_test.exs index 023e35b9..0f9ade02 100644 --- a/test/integration/proxy_test.exs +++ b/test/integration/proxy_test.exs @@ -1,5 +1,5 @@ defmodule Supavisor.Integration.ProxyTest do - use Supavisor.DataCase, async: true + use Supavisor.DataCase, async: false require Logger @@ -361,20 +361,17 @@ 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 match?({_, %{active_count: 1}}, :sys.get_state(client_pid)) + assert {_, %{active_count: 1}} = :sys.get_state(client_pid) Enum.each(0..200, fn _ -> P.SimpleConnection.call(pid, {:query, "select 1;"}) end) - assert match?( - [ - %Postgrex.Result{ - command: :select - } - ], - P.SimpleConnection.call(pid, {:query, "select 1;"}) - ) + assert [ + %Postgrex.Result{ + command: :select + } + ] = P.SimpleConnection.call(pid, {:query, "select 1;"}) end defp single_connection(db_conf, c_port \\ nil) when is_list(db_conf) do