Просмотр исходного кода

Fix stream_handler_SUITE test failures

Loïc Hoguin 7 лет назад
Родитель
Сommit
af58babd94
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      test/handlers/stream_handler_h.erl
  2. 2 2
      test/stream_handler_SUITE.erl

+ 1 - 1
test/handlers/stream_handler_h.erl

@@ -81,7 +81,7 @@ info(StreamID, Info, State=#state{pid=Pid}) ->
 	Pid ! {Pid, self(), info, StreamID, Info, State},
 	Pid ! {Pid, self(), info, StreamID, Info, State},
 	case Info of
 	case Info of
 		please_stop -> {[stop], State};
 		please_stop -> {[stop], State};
-		_ -> {[], State}
+		_ -> {[Info], State}
 	end.
 	end.
 
 
 terminate(StreamID, Reason, State=#state{pid=Pid, test=crash_in_terminate}) ->
 terminate(StreamID, Reason, State=#state{pid=Pid, test=crash_in_terminate}) ->

+ 2 - 2
test/stream_handler_SUITE.erl

@@ -245,7 +245,7 @@ shutdown_on_stream_stop(Config) ->
 	receive {'DOWN', MRef, process, Spawn, shutdown} -> ok after 1000 -> error(timeout) end,
 	receive {'DOWN', MRef, process, Spawn, shutdown} -> ok after 1000 -> error(timeout) end,
 	%% The response is still sent.
 	%% The response is still sent.
 	{response, nofin, 200, _} = gun:await(ConnPid, Ref),
 	{response, nofin, 200, _} = gun:await(ConnPid, Ref),
-	{ok, <<>>} = gun:await_body(ConnPid, Ref),
+	{ok, _} = gun:await_body(ConnPid, Ref),
 	ok.
 	ok.
 
 
 shutdown_on_socket_close(Config) ->
 shutdown_on_socket_close(Config) ->
@@ -295,7 +295,7 @@ shutdown_timeout_on_stream_stop(Config) ->
 	receive {'DOWN', MRef, process, Spawn, killed} -> ok after 1000 -> error(timeout) end,
 	receive {'DOWN', MRef, process, Spawn, killed} -> ok after 1000 -> error(timeout) end,
 	%% The response is still sent.
 	%% The response is still sent.
 	{response, nofin, 200, _} = gun:await(ConnPid, Ref),
 	{response, nofin, 200, _} = gun:await(ConnPid, Ref),
-	{ok, <<>>} = gun:await_body(ConnPid, Ref),
+	{ok, _} = gun:await_body(ConnPid, Ref),
 	ok.
 	ok.
 
 
 shutdown_timeout_on_socket_close(Config) ->
 shutdown_timeout_on_socket_close(Config) ->