@@ -21,7 +21,7 @@ all() ->
21
21
groups () ->
22
22
[{admin , [parallel ], admin_tests ()},
23
23
{user , [parallel ], user_tests ()},
24
- {timeout , [], [sse_should_not_get_timeout ]}].
24
+ {timeout , [parallel ], [sse_should_not_get_timeout , sse_works_with_long_messages ]}].
25
25
26
26
init_per_suite (Config ) ->
27
27
Config1 = escalus :init_per_suite (Config ),
@@ -145,7 +145,14 @@ sse_should_not_get_timeout(Config) ->
145
145
timer :sleep (2000 ),
146
146
escalus :send (Bob , escalus_stanza :chat (From , To , <<" Hello again!" >>)),
147
147
sse_helper :wait_for_event (Stream ),
148
- timer :sleep (2000 ),
148
+ sse_helper :stop_sse (Stream )
149
+ end ).
150
+
151
+ sse_works_with_long_messages (Config ) ->
152
+ escalus :fresh_story (Config , [{alice , 1 }, {bob , 1 }], fun (Alice , Bob ) ->
153
+ From = escalus_client :full_jid (Bob ),
154
+ To = escalus_client :short_jid (Alice ),
155
+ {200 , Stream } = graphql_helper :execute_user_command_sse (<<" stanza" >>, <<" subscribeForMessages" >>, Alice , #{}, Config ),
149
156
Message = binary :copy (<<" 0" >>, 2000 ),
150
157
escalus :send (Bob , escalus_stanza :chat (From , To , Message )),
151
158
sse_helper :wait_for_event (Stream ),
0 commit comments