Closed da2x closed 6 years ago
Good stuff but as you can see this breaks the test in CI so you'll need to also update the testcase for this.
The tests randomly pass/fail because. In my defense, they all passed when I submitted this.
The Linux kernel fails to release the TCP port lock on all interfaces after each test is run and before the next one is started. Previously, each test used different ports so this wasn’t ever an issue.
I’m uncertain about how to proceed here. If I remove test_stdin_gps_autoport_iface
in favor of test_stdin_gps_with_port_iface
then all tests pass (as only one will use the default port – requires fixing test test_stdin_gps_with_port_iface
to actually use a specific port which seems like a bug in the existing test).
hmm.. Can't we ensure that we release the port lock somehow?
Oh! Tests are run concurrently. That would explain the issue.
Tests can either be run with cargo test -- --test-threads=1
or I can change the tests to use different ports. I don’t see any other option. (Well, I could create virtual network interfaces and bind to those, but it changes the tests just as much as testing different ports.)
Which do you prefer, @zeenix?
different ports is better. If the service works on one port, it really should work on another as well.
Do you want me to merge this already and add the lost change myself?
I just forgot to push the second commit, sorry. :)
No worries. Congratulations on becoming a valued contributor! :)
I’ve got a new Contributor badge and everything. 👍
Standard nmea-0183 service port as registered with IANA.
Resolves issue #9.