diff --git a/big_tests/tests/rest_client_SUITE.erl b/big_tests/tests/rest_client_SUITE.erl index 6dddf12f45..26c173f53b 100644 --- a/big_tests/tests/rest_client_SUITE.erl +++ b/big_tests/tests/rest_client_SUITE.erl @@ -1026,14 +1026,14 @@ connect_to_sse(User) -> #{pid => ConnPid, stream_ref => StreamRef}. wait_for_event(#{pid := Pid, stream_ref := StreamRef} = Opts) -> - case gun:await(Pid, StreamRef) of - {response, nofin, _, _} -> + case gun:await(Pid, StreamRef, 5000) of + {response, nofin, _, _} = A -> io:format("await_1 ~p~n", [A]), wait_for_event(Opts); - {data, nofin, _} -> + {data, nofin, _} = A -> io:format("await_2 ~p~n", [A]), wait_for_event(Opts); - {sse, #{data := [Response]}} -> + {sse, #{data := [Response]}} = A -> io:format("await_3 ~p~n", [A]), Opts#{data => Response}; - Error -> + Error -> io:format("await_error ~p~n", [Error]), Error end.