Skip to content

rowenc: de-flake TestEncodeContainingArrayInvertedIndexSpans#57246

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:57237-fix-flaky-test-encode-containing-array
Nov 30, 2020
Merged

rowenc: de-flake TestEncodeContainingArrayInvertedIndexSpans#57246
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:57237-fix-flaky-test-encode-containing-array

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

TestEncodeContainingArrayInvertedIndexSpans was failing sporadically
because of randomized test cases that were incorrectly determining the
expected value for the unique return value from
EncodeContainingInvertedIndexSpans. The test was using the
reflect.DeepEqual function to check for Datum equality, which does
not return true in all cases where Datum.Compare returns 0.

Fixes #57237

Release note: None

`TestEncodeContainingArrayInvertedIndexSpans` was failing sporadically
because of randomized test cases that were incorrectly determining the
expected value for the `unique` return value from
`EncodeContainingInvertedIndexSpans`. The test was using the
`reflect.DeepEqual` function to check for `Datum` equality, which does
not return true in all cases where `Datum.Compare` returns `0`.

Fixes cockroachdb#57237

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@mgartner mgartner requested a review from rytaft November 30, 2020 19:51
Copy link
Copy Markdown
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

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

Nice find! :lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@mgartner
Copy link
Copy Markdown
Contributor Author

bors r=rytaft

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 30, 2020

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 30, 2020

Build succeeded:

@craig craig bot merged commit d5222dc into cockroachdb:master Nov 30, 2020
@mgartner mgartner deleted the 57237-fix-flaky-test-encode-containing-array branch December 1, 2020 00:22
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.

sql: TestEncodeContainingArrayInvertedIndexSpans is flaky

3 participants