zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
438 stars 195 forks source link

`std::runtime_error: Address already in use` with Travis builds #175

Closed danielunderwood closed 7 years ago

danielunderwood commented 7 years ago

It looks like there are a good many Travis builds that are failing with std::runtime_error: Address already in use on random tests. I think the issue may be coming from Travis trying to run the tests simultaneously on the same machine.

I'm not sure if there's any way to force Travis not to call tests simultaneously, although there may be some way to do it with ps and a sleep statement in travis.sh if the zmqpp-test-runner is currently running. This may result in some slower Travis builds if any of the tests take an appreciable amount of time and wouldn't fix the issue if tests were run concurrently for another reason, but may be a bit simpler than changing the tests to wait if the port is in use.

benjamg commented 7 years ago

It's run just using make so should be single threaded there, not sure if it's just spinning up a test before the os has released the socket or something. It's a known issue though just not something I've gotten around to fixing.

I also notice our tests generate a lot of deprecated warnings, probably not the best examples of how to use the library. Probably I will fix those and make sure each test is on a different port to avoid collision.