fix test failed on windows (#330)

This commit is contained in:
Li Xiaobin 2018-04-02 22:53:47 +08:00 committed by Jon Parise
parent cc37cb4dd5
commit 129b9f3a69

View File

@ -339,8 +339,9 @@ defmodule Thrift.Generator.ServiceTest do
{:ok, client} = Client.start_link("127.0.0.1", new_server_port, [])
:timer.sleep(50) # sleep beyond the server's recv_timeout
assert Client.friend_ids_of(client, 1234) == {:error, :closed}
assert_receive {:EXIT, ^client, {:error, :closed}}
assert {:error, closed} = Client.friend_ids_of(client, 1234)
assert closed in [:closed, :econnaborted]
assert_receive {:EXIT, ^client, {:error, ^closed}}
on_exit fn ->
stop_server(new_server)