DAOS-18086 control: Fix racy logic in unit test#18090
Merged
daltonbohning merged 1 commit intomasterfrom Apr 23, 2026
Merged
Conversation
The mock for this test wasn't updated when we switched to dRPC message chunking, so the mocked sessions were failing and being removed. Whether they were removed early enough for the test to detect was intermittent. - Populate valid data in the mockConn used for each mock session. This ensures the sessions remain "open" until the context is canceled (i.e. the test ends). - Add a brief sleep in the test to allow for the goroutines to either die or remain stable. This allowed the test to reproduce the bug 100% of the time. - Update to a table-based test format for the affected tests. Signed-off-by: Kris Jacque <kris.jacque@hpe.com>
Contributor
Author
|
This remains a unit-test-only fix. |
|
Ticket title is 'Unit Tests / Unit Test on EL 8.8 / UTEST_control.drpc.TestServer_Listen_AcceptConnection: data race' |
liw
approved these changes
Apr 22, 2026
Contributor
Author
|
Fault injection test setup failure is a known issue being worked in CI. This patch affects Go unit tests only, and they passed. For local testing, I did 100 runs of this test locally, had 100% bug reproduction with the fix to the tests, but without the fix to the mock. After the mock fix, had 0% bug reproduction. |
mjmac
approved these changes
Apr 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The mock for this test wasn't updated when we switched to dRPC message chunking, so the mocked sessions were failing and being removed. Whether they were removed early enough for the test to detect was intermittent.
Steps for the author:
After all prior steps are complete: