Skip to content

Firestore: query_engine.test.ts: fix logic that checks configureCsi #7501

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

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jul 28, 2023

The unit tests in query_engine.test.ts are parameterized on a configureCsi boolean variable. Some tests are if an if (configureCsi) block, some are in an if (!configureCsi) block, and others are in neither, and run for both values of configureCsi. However, the entire test suite was inside the if (!configureCsi) block, nesting the checks for if (configureCsi) which would unconditionally evaluate to false, causing those tests to never be run. This was likely a coding accident due to the subtle indenting difference.

This PR fixes this by putting the if (configureCsi), if (!configureCsi), and the other block at the same nesting level so that the appropriate tests are run for the appropriate values of configureCsi.

Note to reviewers: Turn off whitespace when looking at the diff, since the vast majority of lines affected by this PR are whitespace-only changes due to indentation level changes.

@dconeybe dconeybe self-assigned this Jul 28, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jul 28, 2023

⚠️ No Changeset found

Latest commit: 71cfd16

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

@dconeybe
Copy link
Contributor Author

FYI I asked about the "Test Auth / Test Auth on Firefox If Changed" action failure: https://chat.google.com/room/AAAAWxMm_lQ/LWD9bSZiJrI. It appears that the workflow may need to be updated.

@google-oss-bot
Copy link
Contributor

@dconeybe dconeybe marked this pull request as ready for review July 28, 2023 16:37
@dconeybe dconeybe requested review from a team as code owners July 28, 2023 16:37
@dconeybe dconeybe requested a review from wu-hui July 28, 2023 17:25
@dconeybe dconeybe merged commit 146b699 into master Jul 31, 2023
@dconeybe dconeybe deleted the dconeybe/QueryEngineConfigureCsiFix branch July 31, 2023 13:55
@firebase firebase locked and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants