Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Use a constant-length timestamp redaction for test determinism #6511

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Sep 3, 2024

Changes our "timestamp redaction" logic to ignore the original length of the input timestamp.

Timestamps are not always constant-width -- depending on the amount of trailing zeros, they can have variable stringified lengths. Unfortunately, this variability is at-odds with our goal of deterministic test output.

In this PR, we favor the deterministic output, to avoid test flaking: Variable space output logic is removed in favor of a stable redaction marker. Additionally, tests with different timestamp lengths are added to act as a regression against this particular flake.

Fixes #6509

test-utils/src/dev/test_cmds.rs Outdated Show resolved Hide resolved
test-utils/src/dev/test_cmds.rs Outdated Show resolved Hide resolved
@smklein smklein enabled auto-merge (squash) September 3, 2024 20:42
@davepacheco
Copy link
Collaborator

Thanks for this fix!

@smklein smklein merged commit a77c31b into main Sep 3, 2024
23 checks passed
@smklein smklein deleted the constant-length-redactions branch September 3, 2024 21:57
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.

test failure: omicron-omdb::test_all_output test_omdb_success_cases
3 participants