diff options
-rw-r--r-- | test/flow_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/flow_SUITE.erl b/test/flow_SUITE.erl index 9050706..feb5b2e 100644 --- a/test/flow_SUITE.erl +++ b/test/flow_SUITE.erl @@ -184,18 +184,18 @@ flow_ws(_) -> %% Gun handles them in separate Protocol:handle calls. Frame = {text, <<"Hello!">>}, gun:ws_send(ConnPid, Frame), - timer:sleep(100), + timer:sleep(500), gun:ws_send(ConnPid, Frame), %% We set the flow to 1 therefore we will receive 1 data message, %% and then nothing because Gun doesn't read from the socket. {ws, _} = gun:await(ConnPid, StreamRef), {error, timeout} = gun:await(ConnPid, StreamRef, 3000), - %% We send 2 more frames. + %% We then update the flow, send 2 frames with some time in between + %% and get 2 more data messages but no more. + gun:update_flow(ConnPid, StreamRef, 2), gun:ws_send(ConnPid, Frame), - timer:sleep(100), + timer:sleep(500), gun:ws_send(ConnPid, Frame), - %% We then update the flow and get 2 more data messages but no more. - gun:update_flow(ConnPid, StreamRef, 2), {ws, _} = gun:await(ConnPid, StreamRef), {ws, _} = gun:await(ConnPid, StreamRef), {error, timeout} = gun:await(ConnPid, StreamRef, 1000), |