summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-12 18:28:54 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-12 18:29:07 +0300
commit1306b92997dc6e76e5d617d529dbc229d5aee200 (patch)
tree7f5b72bb074053dbcfa0e268ce275ef6c6a8a9e7 /test
parentf39e1b9eff859c0795911212c59304f68fca92bc (diff)
downloadpleroma-1306b92997dc6e76e5d617d529dbc229d5aee200.tar.gz
pleroma-1306b92997dc6e76e5d617d529dbc229d5aee200.zip
clean up
Diffstat (limited to 'test')
-rw-r--r--test/http/adapter_helper/gun_test.exs12
-rw-r--r--test/pool/connections_test.exs2
2 files changed, 5 insertions, 9 deletions
diff --git a/test/http/adapter_helper/gun_test.exs b/test/http/adapter_helper/gun_test.exs
index 6af8be15d..18025b986 100644
--- a/test/http/adapter_helper/gun_test.exs
+++ b/test/http/adapter_helper/gun_test.exs
@@ -6,7 +6,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
use ExUnit.Case, async: true
use Pleroma.Tests.Helpers
- import ExUnit.CaptureLog
import Mox
alias Pleroma.Config
@@ -63,7 +62,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
opts = Gun.options([receive_conn: false], uri)
assert opts[:certificates_verification]
- assert opts[:transport] == :tls
end
test "get conn on next request" do
@@ -73,14 +71,12 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
on_exit(fn -> Logger.configure(level: level) end)
uri = URI.parse("http://some-domain2.com")
- assert capture_log(fn ->
- opts = Gun.options(uri)
+ opts = Gun.options(uri)
- assert opts[:conn] == nil
- assert opts[:close_conn] == nil
- end) =~
- "Gun connections pool checkin was not successful. Trying to open conn for next request."
+ assert opts[:conn] == nil
+ assert opts[:close_conn] == nil
+ Process.sleep(50)
opts = Gun.options(uri)
assert is_pid(opts[:conn])
diff --git a/test/pool/connections_test.exs b/test/pool/connections_test.exs
index 06f32b74e..aeda54875 100644
--- a/test/pool/connections_test.exs
+++ b/test/pool/connections_test.exs
@@ -355,7 +355,7 @@ defmodule Pleroma.Pool.ConnectionsTest do
refute Conn.open(url, name)
refute Connections.checkin(url, name)
end) =~
- "Received error on opening connection http://gun-not-up.com {:error, :timeout}"
+ "Opening connection to http://gun-not-up.com failed with error {:error, :timeout}"
end
test "process gun_down message and then gun_up", %{name: name} do