Solution: fix tests by confirming subscription before sending message
I noticed the tests failed for https://github.com/zeromq/goczmq/pull/286 . Same tests I also saw randomly failing locally. These tests failed because they have a race: they publish a message potentially before a subscription has reached the pub socket.
I solved this by switching to XPub socket and explicitly checking that said socket received the expected amount of subscription messages. This makes the tests solid with repeated go clean -cache; make test runs.
Solution: fix tests by confirming subscription before sending message
I noticed the tests failed for https://github.com/zeromq/goczmq/pull/286 . Same tests I also saw randomly failing locally. These tests failed because they have a race: they publish a message potentially before a subscription has reached the pub socket.
I solved this by switching to XPub socket and explicitly checking that said socket received the expected amount of subscription messages. This makes the tests solid with repeated
go clean -cache; make test
runs.