Skip to content

Deflake TestValidateLinearizableOperationsTimeoutIsRepected - #22258

Open
Hrishi-Baskaran wants to merge 1 commit into
etcd-io:mainfrom
Hrishi-Baskaran:deflake-linearizable-timeout-test
Open

Deflake TestValidateLinearizableOperationsTimeoutIsRepected#22258
Hrishi-Baskaran wants to merge 1 commit into
etcd-io:mainfrom
Hrishi-Baskaran:deflake-linearizable-timeout-test

Conversation

@Hrishi-Baskaran

@Hrishi-Baskaran Hrishi-Baskaran commented Aug 9, 2026

Copy link
Copy Markdown

Resolves #22257

Removes an unnecessary assertion that involves comparing executed time of validateLinearizableOperationsAndVisualize to the wall clock elapsed duration. This is inherently nondeterministic.

I was able to cause this assertion to fail with stress

--- FAIL: TestValidateLinearizableOperationsTimeoutIsRespected (1.47s)
    operations_test.go:362: validateLinearizableOperationsAndVisualize(...) does not respect timeout: 1.255761557s, timeout was 1s
FAIL

validateLinearizableOperationsAndVisualize is a somewhat thin wrapper around porcupine.CheckOperationsVerbose. We were essentially just checking if the timeout of porcupine.CheckOperationsVerbose works. We should instead just keep the tests that verify what our wrapper does: carry the timeout info into the result.Message.

Also reduces the timeout to one nanosecond to ensure that the timeout triggers for very fast machines. I coudn't get this to trigger with stress but I thought it would be a good idea to also eliminate this source of nondeterminism as well.

@kubernetes-prow

Copy link
Copy Markdown

Hi @Hrishi-Baskaran. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Hrishi-Baskaran
Hrishi-Baskaran force-pushed the deflake-linearizable-timeout-test branch 2 times, most recently from c5bb486 to 4637a94 Compare August 11, 2026 02:14
@Hrishi-Baskaran

Hrishi-Baskaran commented Aug 11, 2026

Copy link
Copy Markdown
Author

@spzala, @serathius could you please review?

Comment thread tests/robustness/validate/operations_test.go Outdated
@Hrishi-Baskaran

Copy link
Copy Markdown
Author

Hey @serathius just curious about how multi-commit PRs should match etcd's commit format?

Should I squash before I request a review or should I squash and merge, just keeping the first commit to hold the main information about the PR?

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Hrishi-Baskaran, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@serathius

Copy link
Copy Markdown
Member

/ok-to-test

@serathius

Copy link
Copy Markdown
Member

Hey @serathius just curious about how multi-commit PRs should match etcd's commit format?

Should I squash before I request a review or should I squash and merge, just keeping the first commit to hold the main information about the PR?

Let's just squash. Commit format is very old and we didn't really follow it. At least until AI came. I personally don't see the value.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.65%. Comparing base (5b75ac6) to head (e5a789d).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files

see 31 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #22258      +/-   ##
==========================================
- Coverage   69.75%   69.65%   -0.10%     
==========================================
  Files         449      449              
  Lines       38212    38193      -19     
==========================================
- Hits        26653    26605      -48     
- Misses      10134    10165      +31     
+ Partials     1425     1423       -2     

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b75ac6...e5a789d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…utIsRespected

Removes an uneccessary assertion that involves comparing executed time of validateLinearizableOperationsAndVisualize
to the wall clock elapsed duration. This is inherently nondeterministic.

validateLinearizableOperationsAndVisualize is a somewhat thin wrapper around
porcupine.CheckOperationsVerbose. We were essentially just checking if the
timeout of porcupine.CheckOperationsVerbose works. We should instead
just keep the tests that verify what our wrapper does: carry the
timeout info into the result.Message

Signed-off-by: Hrishi Baskaran <hrishithevar@gmail.com>
@Hrishi-Baskaran
Hrishi-Baskaran force-pushed the deflake-linearizable-timeout-test branch from 433af57 to e5a789d Compare August 18, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Flaky TestValidateLinearizableOperationsTimeoutIsRespected

2 participants