diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-17 18:51:35 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-17 18:51:35 +0200 |
| commit | 7e01b7e8c2ce2ef9fce8b6c053c3b7210b64f9bf (patch) | |
| tree | 9b5d0aae04e226e1f3c7187a4866ee421544f7a4 /packages/meshbay-hub/tests/test_search_connect_deadline.py | |
| parent | 8125df6d8149368ed8a84c9db6c5e37bfccb5a15 (diff) | |
| download | meshbay-7e01b7e8c2ce2ef9fce8b6c053c3b7210b64f9bf.tar.gz | |
fix(spa): search names the groups refused the local network
Search gives up before ICE does, so the refusal is read from the
connection then; the walk moves on to the group's other nodes, and the
page lists the refused groups with a link to each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_search_connect_deadline.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_search_connect_deadline.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_search_connect_deadline.py b/packages/meshbay-hub/tests/test_search_connect_deadline.py index 953f0277..0dfee4e0 100644 --- a/packages/meshbay-hub/tests/test_search_connect_deadline.py +++ b/packages/meshbay-hub/tests/test_search_connect_deadline.py @@ -123,3 +123,21 @@ def test_a_fast_connection_is_unaffected(): out = _attempt(progressAt=[], resolveAt=3000) assert out["result"] == "connected" assert out["at"] == 3000 + + +def test_a_node_refused_the_local_network_is_named_when_search_gives_up(): + """Android 17 and Chrome 155 refuse the node's address on the phone's Wi-Fi + without the permission, and connect() names it only when ICE gives up, + long after search has: the refusal is read from the connection then.""" + out = _attempt(lanRefused=[0]) + assert out["result"] == "failed" and out["reason"] == "local_network_blocked", out + assert out["at"] == STALL_MS, out + + +def test_a_refused_node_does_not_stop_the_walk(): + """Refused here is one node: another of the group may be elsewhere.""" + out = _attempt(nodes=2, lanRefused=[0], answering=[1], progressAt=[], resolveAt=500) + assert out["result"] == "connected", out + # And when no node answers, the refusal is what is said, not a timeout. + out = _attempt(nodes=2, lanRefused=[0]) + assert out["reason"] == "local_network_blocked", out |