projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
[akkoma]
/
test
/
http
/
adapter_helper
/
gun_test.exs
diff --git
a/test/http/adapter_helper/gun_test.exs
b/test/http/adapter_helper/gun_test.exs
index 6af8be15d0cdacfc98df2b655c84b912fbaa56ce..2e961826ede9fb72fdbb05be211799b70c77d79b 100644
(file)
--- 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
use ExUnit.Case, async: true
use Pleroma.Tests.Helpers
- import ExUnit.CaptureLog
import Mox
alias Pleroma.Config
import Mox
alias Pleroma.Config
@@
-29,9
+28,7
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
end
describe "options/1" do
end
describe "options/1" do
- clear_config([:http, :adapter]) do
- Config.put([:http, :adapter], a: 1, b: 2)
- end
+ setup do: clear_config([:http, :adapter], a: 1, b: 2)
test "https url with default port" do
uri = URI.parse("https://example.com")
test "https url with default port" do
uri = URI.parse("https://example.com")
@@
-63,7
+60,6
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
opts = Gun.options([receive_conn: false], uri)
assert opts[:certificates_verification]
opts = Gun.options([receive_conn: false], uri)
assert opts[:certificates_verification]
- assert opts[:transport] == :tls
end
test "get conn on next request" do
end
test "get conn on next request" do
@@
-73,14
+69,12
@@
defmodule Pleroma.HTTP.AdapterHelper.GunTest do
on_exit(fn -> Logger.configure(level: level) end)
uri = URI.parse("http://some-domain2.com")
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])
opts = Gun.options(uri)
assert is_pid(opts[:conn])