renproject / aw

A flexible P2P networking library for upgradable distributed systems.
MIT License
38 stars 18 forks source link

Robust handshake tests #78

Closed ross-pure closed 3 years ago

ross-pure commented 3 years ago

This PR fixes an issue where some of the handshake tests could sporadically fail. The failure was due to using timeouts to know when to check the success condition, but it was possible that after the timeouts the success condition would not be met, even though it would be eventually. The fix is to use channels to reliably signal that the success condition is ready to be checked.

rahulghangas commented 3 years ago

LGTM, the CI is still stuck though. I think it might be stuck on (have seen it do this once before)

When("the server is offline", func() {
            It("should retry", func() {

Edit -- The CI finally failed, and yep, it was stuck on the aforementioned test