You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client is connected with the client, if it loses connection it should send a last-event-id header when reconnecting.
If events has occurred since then, the server push the events the client has missed.
However those tests are a bit tedious to write:
We want to test errors behavior, so the testbed server cannot be used.
We want to test the whole SSE machinery, including the 3rd party libs that implement SSE protocol.
So we cannot use the testbed mock system.
So there is two solutions to implemented those tests:
Modify the testbed server to be able to notify it when it should voluntarily close the client connection to simulate loss of connection.
Start our own dummy HTTP server and serve SSE payloads
We used to have an implementation of such code,
but it got replaced by the use of the testbed server. Guess it's time for it to return \o/.
Solution 2 seems the cleaner and less painful way to go (given for testing the last-event-id system, we want).
The text was updated successfully, but these errors were encountered:
touilleMan
changed the title
[:boxing_glove: :1st_place_medal: Additional tests for SSE (client side)
[:boxing_glove: :1st_place_medal: Final oxidation] Additional tests for SSE (client side)
May 16, 2023
FirelightFlagboy
changed the title
[:boxing_glove: :1st_place_medal: Final oxidation] Additional tests for SSE (client side)
[:boxing_glove: :crab: :1st_place_medal: Final oxidation] Additional tests for SSE (client side)
May 17, 2023
touilleMan
changed the title
[:boxing_glove: :crab: :1st_place_medal: Final oxidation] Additional tests for SSE (client side)
Additional tests for SSE (client side)
Jan 29, 2024
Basic tests for SSE already exists:
parsec-cloud/oxidation/libparsec/crates/client_connection/tests/cmds.rs
Lines 66 to 161 in 76f06a1
Additional tests we want:
SSE Client: Test the
missed_events
mechanismThe server can send a special SSE message
missed_events
that should trigger a special SSE response type in the client.SSE Client: Test the
last-event-id
mechanism works when connection disconnects #5511The client is connected with the client, if it loses connection it should send a
last-event-id
header when reconnecting.If events has occurred since then, the server push the events the client has missed.
However those tests are a bit tedious to write:
So we cannot use the testbed mock system.
So there is two solutions to implemented those tests:
Modify the testbed server to be able to notify it when it should voluntarily close the client connection to simulate loss of connection.
Start our own dummy HTTP server and serve SSE payloads
We used to have an implementation of such code,
but it got replaced by the use of the testbed server. Guess it's time for it to return \o/.
Solution
2
seems the cleaner and less painful way to go (given for testing thelast-event-id
system, we want).The text was updated successfully, but these errors were encountered: