X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fgun%2Fconnection_pool_test.exs;h=51637f5412d95df5398c7966e9e0070b2a705fb0;hb=3928cecf6bc0bdfc3172482ed6541b141facb83c;hp=aea908fac3257504abced8c700d93ac0e3a32449;hpb=b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe;p=akkoma
diff --git a/test/pleroma/gun/connection_pool_test.exs b/test/pleroma/gun/connection_pool_test.exs
index aea908fac..51637f541 100644
--- a/test/pleroma/gun/connection_pool_test.exs
+++ b/test/pleroma/gun/connection_pool_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Gun.ConnectionPoolTest do
@@ -7,7 +7,6 @@ defmodule Pleroma.Gun.ConnectionPoolTest do
import Mox
import ExUnit.CaptureLog
- alias Pleroma.Config
alias Pleroma.Gun.ConnectionPool
defp gun_mock(_) do
@@ -19,7 +18,6 @@ defmodule Pleroma.Gun.ConnectionPoolTest do
:ok
end
- setup :set_mox_from_context
setup :gun_mock
test "gives the same connection to 2 concurrent requests" do
@@ -48,9 +46,10 @@ defmodule Pleroma.Gun.ConnectionPoolTest do
end
end
+ @tag :erratic
test "connection limit is respected with concurrent requests" do
clear_config([:connections_pool, :max_connections]) do
- Config.put([:connections_pool, :max_connections], 1)
+ clear_config([:connections_pool, :max_connections], 1)
# The supervisor needs a reboot to apply the new config setting
Process.exit(Process.whereis(Pleroma.Gun.ConnectionPool.WorkerSupervisor), :kill)