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 expected result set of transform test #640

Closed
wants to merge 1 commit into from
Closed

Conversation

keiko713
Copy link
Contributor

The test was having the wrong expected result set, so I updated it. Without this fix, test was consistently failing (e.g. if I run test 10 times, it guaranteed to fail a few times), but with this fix, I ran test 50 times and it was working fine (I also triple checked the logic).

#630 (comment)

I agree with others that the current testing logic is not ideal and also very hard to maintain. I thought about removing this completely, but it's a nice test to have and it was still fixable for now (as it had a clear bug) so I went forward and fixed it. We shouldn't expand this test any further and if we want to add something, we should reconsider how we do the test.
I'm not so sure if the sorting works, this test is passing input to the blackbox (transform.StateToSnapshot) and we don't know in which combination the blackbox is going to return the result with.

@keiko713 keiko713 requested a review from a team November 26, 2024 01:23
@@ -134,7 +134,7 @@ func TestStatements(t *testing.T) {
}
expectedJSON, _ := json.Marshal(expected)

// Query: 1, 0, Plan: 0, 1
// Query: 1, 0, Plan: 0, 1 (w/ QueryIdx 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: the "bug" part is; I forgot that I was using the second query as a plan's query, so the QueryIdx of QueryPlanReference does change (previously, it was using the fixed number 1 here).
Now QueryPlanReference has the right set of combinations.

@keiko713
Copy link
Contributor Author

Closing in favor of #639

@keiko713 keiko713 closed this Nov 26, 2024
@keiko713 keiko713 deleted the fix-transform-test branch November 26, 2024 01:32
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.

1 participant