Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go test: fails randomly in channeler_test.go with Errorf: timeout #253

Open
cyrilleverrier opened this issue Feb 22, 2019 · 0 comments
Open

Comments

@cyrilleverrier
Copy link
Contributor

Steps to reproduce:
make test / go test -v / go test -v -race

Some of the tests fail randomly with t.Errorf("timeout") when trying to receive a new message from the subscriber channel.

Explanation:
A message is sent to the SendChan just after the subscriber with a RecvChan has been created.
I guess that the subscriber doesn't have enough time to run its internal go-routine and the message sent in the unit test is lost.

New functions like NewSubChanneler should exit only after the go-routine in the subscriber is polling new messages from the zeromq sock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant