Candidate changes to provide a way for user code to tell if Senders are really ready to send data #66
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.
In recent running of automated integration tests, I noticed occasional complaints about timeouts sending HSIEvents from FakeHSIEventGenerators to TimingTriggerCandidateMakers.
I found that the underlying problem was that the HSIEvent NetworkSender instance was not quite fully ready to send messages.
In order to provide a way for the FakeHSIEventGenerator code to check whether the Sender instance is really ready, I've prototyped a new method that provides this information. These changes are the subject of this PR.
As an aside, I want to mention that I found the existing contents of the NetworkSenderModel constructor very confusing. It had a try/catch block surrounding a method call that doesn't throw an exception. To help make things more clear, I removed that try/catch block. With this change, I now correctly see the "Initial connection attempt failed" log message. Previously, I was not correctly seeing this message in the logs.
The changes in this PR are precursors to ones in a companion PR that I will file soon in the
hsilibs
repo.