You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fake-server tests had to bind the real primary port because PrimaryClient always connected to UR_PRIMARY_PORT. Another listener made TCPServer retry the bind forever, hanging the tests. PrimaryClient now takes an optional port, and the fake-server fixtures use dedicated test ports.
getPackageLength() also copies the length bytes before the endian swap, so an unaligned position in the byte stream is no longer read through a cast.
Fake-server tests had to bind the real primary port because PrimaryClient
always connected to UR_PRIMARY_PORT. Another listener made TCPServer retry
the bind forever, hanging the tests. PrimaryClient now takes an optional
port, and the fake-server fixtures use dedicated test ports.
getPackageLength() also copies the length bytes before the endian swap, so
an unaligned position in the byte stream is no longer read through a cast.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (00893ff) to head (d6e3b54). ⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.
A fixed test port can already be in use, and TCPServer retries that bind
forever. The fake-server fixtures now pass port 0 so bind() selects an
available port, and the reconnect test reuses that assigned port.
Adding a defaulted port parameter replaced the exported constructor, so
already-built callers of the shared library would fail to load. The
original constructor now delegates to a separate overload that takes the
port.
Parser tests pass buffers from their aligned start, so they never call
getPackageLength() one byte into a stream. That is the read the old cast
could mishandle.
Prevent replacement server from hanging on fixed-port rebind
tests/test_primary_client_reconnect.cpp:182
The replacement server still binds a previously released fixed port with TCPServer's default unlimited retries. This port remains unreserved for the entire reconnect/stop interval, so another concurrent test or process can claim it; on platforms where immediate rebinding is delayed, the same bind can also fail temporarily. In either case this constructor can hang forever, preserving the failure mode the PR is intended to remove. Give FakePrimaryServer a finite bind-attempt option and use it here (or otherwise keep/reserve the port) so a rebind failure terminates the test instead of blocking indefinitely.
The replacement server bound a port that had been free for the whole stop
interval, and TCPServer retries that bind forever. FakePrimaryServer now
takes a bind retry limit, and the test uses a finite one so a collision
fails the test.
Addressed the previously missed rebind hang in 4590227.
The replacement server in PrimaryClientReconnectTest.stop_not_blocked_by_stuck_reconnect_thread was binding a port that had been free for the whole stop interval, and TCPServer retries that bind forever. FakePrimaryServer now takes a bind retry limit, and that replacement server uses 5 attempts, 100 ms apart, so a collision fails the test instead of hanging.
…l request.
Those changes now live in UniversalRobots#582, including the review follow-ups. The RTDE package-length read stays, because coalesced fake-server frames still need it.
This reverts the separate two-argument overload. ABI stability is not
guaranteed (see UniversalRobots#562), so a defaulted port parameter is preferred.
This new parameter documentation promises that the supplied notifier receives lifecycle events, but the constructor marks the parameter unused and passes the separate default-constructed notifier_ member to the pipeline. Either initialize/use the supplied notifier or document that this parameter is retained as an unused compatibility argument.
This issue also appears on line 76 of the same file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fake-server tests had to bind the real primary port because PrimaryClient always connected to UR_PRIMARY_PORT. Another listener made TCPServer retry the bind forever, hanging the tests. PrimaryClient now takes an optional port, and the fake-server fixtures use dedicated test ports.
getPackageLength() also copies the length bytes before the endian swap, so an unaligned position in the byte stream is no longer read through a cast.