Skip to content

Commit

Permalink
Merge branch '366-fixtest'
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Dec 21, 2019
2 parents dd52067 + a1420a0 commit dc26157
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/wormhole/_dilation/manager.py
Expand Up @@ -92,7 +92,7 @@ def make_side():
# can send HINTS, but it must not be given any HINTS that arrive before
# RECONNECTING (since they're probably stale)

# * after VERSIONS(KCM) received, we might learn that they other side cannot
# * after VERSIONS(KCM) received, we might learn that the other side cannot
# dilate. w.dilate errbacks at this point

# * maybe signal warning if we stay in a "want" state for too long
Expand Down
10 changes: 5 additions & 5 deletions src/wormhole/test/dilate/test_manager.py
Expand Up @@ -237,16 +237,18 @@ def test_leader(self):
])
clear_mock_calls(h.inbound)

eps = m.get_endpoints()
self.assertTrue(hasattr(eps, "control"))
self.assertTrue(hasattr(eps, "connect"))
self.assertEqual(eps.listen, h.listen_ep)

m.got_wormhole_versions({"can-dilate": ["1"]})
self.assertEqual(h.send.mock_calls, [
mock.call.send("dilate-0",
dict_to_bytes({"type": "please", "side": LEADER}))
])
clear_mock_calls(h.send)

listen_d = m.get_endpoints().listen.listen(None)
self.assertNoResult(listen_d)

# ignore early hints
m.rx_HINTS({})
self.assertEqual(h.send.mock_calls, [])
Expand All @@ -267,8 +269,6 @@ def test_leader(self):
self.assertEqual(c.mock_calls, [mock.call.start()])
clear_mock_calls(connector, c)

self.assertNoResult(listen_d)

# now any inbound hints should get passed to our Connector
with mock.patch("wormhole._dilation.manager.parse_hint",
side_effect=["p1", None, "p3"]) as ph:
Expand Down

0 comments on commit dc26157

Please sign in to comment.