open conn in separate task

This commit is contained in:
Alexander Strizhakov 2020-02-24 19:56:27 +03:00
commit 8efae966b1
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
12 changed files with 384 additions and 304 deletions

View file

@ -19,6 +19,12 @@ defmodule Pleroma.GunTest do
assert json = receive_response(conn, ref)
assert %{"args" => %{"a" => "b", "c" => "d"}} = Jason.decode!(json)
{:ok, pid} = Task.start(fn -> Process.sleep(50) end)
:ok = :gun.set_owner(conn, pid)
assert :gun.info(conn).owner == pid
end
defp receive_response(conn, ref, acc \\ "") do