gossip
gossip copied to clipboard
Fix conntable tests
Conntable uses channels to handle all its updates and stuff. So when we were calling Notify
and then immediately checking the outcome, it was hit-and-miss whether it would have been correctly created or not.
Similarly, when we called timing.Elapse
right after, sometimes the timer hadn't yet been created, so the expiry tests were failing sporadically.
This PR changes all the conntable tests to use testutils.Eventually
to check our assumptions about the connections being properly registered before continuing with the test.