Skip to content

Fix flaky test by removing log assertions - #179

Open
lforchini wants to merge 1 commit into
fix-formatting2from
fix/flaky-test
Open

lforchini wants to merge 1 commit into
fix-formatting2from
fix/flaky-test

Conversation

@lforchini

Copy link
Copy Markdown
Collaborator

Don't assert on the contents of log lines, instead use a fake client
capable of storing history. In the future, this client should be
replaced by the universal unit-testing client requested in #130 but
should suffice for now.

The issue seemed to be a race between parallel tests on the tracing
setup where tracing may incorrectly cache that an event call site is
ignored, causing it to drop events. This manifested as missing log lines
in the per-vm log. This bug should be testing specific since the actual
application only has a single dispatcher. Therefore start to remove
tests which assert the contents of logs in favor of the actual events.

AI-Generated: Diagnosis
Signed-off-by: Leonardo Forchini leonardo.forchini@nutanix.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@lforchini
lforchini added this pull request to stack #180 November 6, 2026 10:24
@lforchini
lforchini marked this pull request as ready for review November 6, 2026 10:26
Comment thread src/controller.rs Resolved
Don't assert on the contents of log lines, instead use a fake client
capable of storing history. In the future, this client should be
replaced by the universal unit-testing client requested in #130 but
should suffice for now.

The issue seemed to be a race between parallel tests on the tracing
setup where tracing may incorrectly cache that an event call site is
ignored, causing it to drop events. This manifested as missing log lines
in the per-vm log. This bug should be testing specific since the actual
application only has a single dispatcher. Therefore start to remove
tests which assert the contents of logs in favor of the actual events.

AI-Generated: Diagnosis
Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants