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

Fix e2e.RequireEqualRecordBatches #967

Merged
merged 5 commits into from
Jan 3, 2024
Merged

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Jan 3, 2024

I introduced regression in #923

Function was returning bool while callers expect testify/require semantics

@@ -65,3 +65,41 @@ func CheckQRecordEquality(t *testing.T, q model.QRecord, other model.QRecord) bo

return true
}

// Equals checks if two QRecordBatches are identical.
func CheckEqualRecordBatches(t *testing.T, q *model.QRecordBatch, other *model.QRecordBatch) bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maintaining the bool returning version as I intend to move our tests towards WaitFor which will want plenty of boolean utility functions

Function was returning bool while callers expect testify/require semantics
@serprex serprex force-pushed the fix-require-equal-record-batches branch from 6bbeff0 to 2cfcd10 Compare January 3, 2024 03:41
@serprex serprex requested a review from heavycrystal January 3, 2024 15:15
@heavycrystal
Copy link
Contributor

lint seems to be a false positive, doesn't show up locally

serprex and others added 2 commits January 3, 2024 16:34
We were never actually checking the geo column values in snowflake qrep.
This PR aims to fix that and also a lint
Fixes #973
serprex added a commit that referenced this pull request Jan 3, 2024
docs:
> FailNow must be called from the goroutine running the test or benchmark function,
> not from other goroutines created during the test

This would cause workflow to hang if it was waiting on goroutine,
so introduce helper functions which:
1. Check assertion
2. Log failure & mark test failed
3. Cancel workflow
4. Abort goroutine

A followup PR will fix calls to compareTableContents after #967 merges too
@serprex serprex merged commit 20ed252 into main Jan 3, 2024
serprex added a commit that referenced this pull request Jan 3, 2024
docs:
> FailNow must be called from the goroutine running the test or benchmark function,
> not from other goroutines created during the test

This would cause workflow to hang if it was waiting on goroutine,
so introduce helper functions which:
1. Check assertion
2. Log failure & mark test failed
3. Cancel workflow
4. Abort goroutine

A followup PR will fix calls to compareTableContents after #967 merges too
@serprex serprex deleted the fix-require-equal-record-batches branch January 4, 2024 00:11
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.

4 participants