From 129b9f3a69397a9387677f48cef3cbd7cfdd57c2 Mon Sep 17 00:00:00 2001 From: Li Xiaobin Date: Mon, 2 Apr 2018 22:53:47 +0800 Subject: [PATCH] fix test failed on windows (#330) --- test/thrift/generator/service_test.exs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/thrift/generator/service_test.exs b/test/thrift/generator/service_test.exs index cf803c6..0113a45 100644 --- a/test/thrift/generator/service_test.exs +++ b/test/thrift/generator/service_test.exs @@ -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)