Skip to content

Commit

Permalink
[tests] Use a constant-length timestamp redaction for test determinism (
Browse files Browse the repository at this point in the history
#6511)

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
  • Loading branch information
smklein authored Sep 3, 2024
1 parent 164aa1a commit a77c31b
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 104 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a77c31b

Please sign in to comment.