diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_reconnect_race.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_reconnect_race.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_reconnect_race.py b/packages/meshbay-hub/tests/test_reconnect_race.py index 01c51824..539ae268 100644 --- a/packages/meshbay-hub/tests/test_reconnect_race.py +++ b/packages/meshbay-hub/tests/test_reconnect_race.py @@ -75,6 +75,18 @@ def test_the_replaced_channels_close_event_is_ignored(late): assert out["outcome"] == "done" and out["written"] == 400 +@pytest.mark.parametrize("cfg", [{}, {"rttMs": 800}, {"openMs": 2500}]) +def test_a_film_playing_says_nothing_before_the_handshake(cfg): + # Reported live on a phone moving from mobile data to Wi-Fi: the player + # went on granting stream credit through the reconnect, one grant reached + # the new channel before its handshake, and the node's "Handshake required" + # replaced the film. A grant or a diagnostic for a stream the lost session + # took with it has nowhere to go; the reconnect asks for the stream again. + out = _run(stream=True, runUntil=60000, **cfg) + assert out["outcome"] == "done" and out["reconnected"] == 1 + assert out["refusedTypes"] == [], out["refusedTypes"] + + def _node_opening_types() -> set[str]: """What the node answers before the handshake, read from its dispatch.""" from meshbay_common.protocol import MNP |