Skip to content

fix flaky LittDB test#3531

Merged
cody-littley merged 3 commits into
mainfrom
cjl/litt-test-fix
Jun 3, 2026
Merged

fix flaky LittDB test#3531
cody-littley merged 3 commits into
mainfrom
cjl/litt-test-fix

Conversation

@cody-littley

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Fix flaky unit test

@cursor

cursor Bot commented Jun 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Only test assertions and random test parameters changed; no production LittDB or storage logic is modified.

Overview
Stabilizes LittDB disktable corruption/restart tests in disk_table_test.go without changing production behavior.

For truncated key/value file scenarios, truncation only picks a random non-zero length when the on-disk file has more than one byte (> 0> 1), avoiding edge cases where the file could be wiped to empty and assertions about missing keys would fail intermittently.

For metadata preserved on restart and orphaned metadata tests, configured TTL is now at least one hour (plus a small random jitter) instead of sub-second values, so background GC is unlikely to run during the brief close/reopen cycle and disturb metadata expectations.

Reviewed by Cursor Bugbot for commit 38d53c1. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 3, 2026, 12:07 PM

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.28%. Comparing base (2151ba0) to head (38d53c1).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3531      +/-   ##
==========================================
- Coverage   59.12%   58.28%   -0.85%     
==========================================
  Files        2213     2140      -73     
  Lines      182814   174431    -8383     
==========================================
- Hits       108096   101660    -6436     
+ Misses      64993    63725    -1268     
+ Partials     9725     9046     -679     
Flag Coverage Δ
sei-chain-pr 66.13% <ø> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 73 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wen-coding wen-coding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but can you update title to say which flaky test we are fixing?

@cody-littley cody-littley changed the title fix flaky test fix flaky LittDB test Jun 2, 2026
@cody-littley cody-littley added this pull request to the merge queue Jun 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 2, 2026
@cody-littley cody-littley enabled auto-merge June 3, 2026 12:05
@cody-littley cody-littley added this pull request to the merge queue Jun 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 3, 2026
@cody-littley cody-littley added this pull request to the merge queue Jun 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 3, 2026
@cody-littley cody-littley added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 9497ce2 Jun 3, 2026
54 checks passed
@cody-littley cody-littley deleted the cjl/litt-test-fix branch June 3, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants