diff --git a/test/websockex_test.exs b/test/websockex_test.exs index 813a4bc..6548d46 100644 --- a/test/websockex_test.exs +++ b/test/websockex_test.exs @@ -605,11 +605,16 @@ defmodule WebSockexTest do # Really glad that I got those sys behaviors now :sys.suspend(pid) + test_pid = self() + task = Task.async(fn -> + send(test_pid, :task_started) WebSockex.send_frame(pid, {:text, "hello"}) end) + assert_receive :task_started + :gen_tcp.shutdown(conn.socket, :write) :sys.resume(pid)