Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

test: sort results, check for sorted order#1245

Merged
danieljbruce merged 3 commits intogoogleapis:mainfrom
danieljbruce:fix-union-sample
Apr 2, 2024
Merged

test: sort results, check for sorted order#1245
danieljbruce merged 3 commits intogoogleapis:mainfrom
danieljbruce:fix-union-sample

Conversation

@danieljbruce
Copy link
Copy Markdown
Contributor

The sample test for OR queries is flakey. As the sample loops through the entities retrieved it prints out the entities and the test checks the exact string that is printed out. However, runQuery might fetch the entities in any order so for this test to consistently work we need to sort the entities it fetches and then compare the printed sorted entities with a string. By sorting the fetched entities it means the test will not fail if the entities are returned in a different order. The test should not expect a specific order for the entities since runQuery doesn't guarantee the entities to be in a specific order.

@danieljbruce danieljbruce requested a review from a team as a code owner April 2, 2024 17:55
@danieljbruce danieljbruce requested a review from a team April 2, 2024 17:55
@conventional-commit-lint-gcf
Copy link
Copy Markdown

conventional-commit-lint-gcf bot commented Apr 2, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: datastore Issues related to the googleapis/nodejs-datastore API. labels Apr 2, 2024
@danieljbruce danieljbruce added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@danieljbruce danieljbruce merged commit 10f85fd into googleapis:main Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: datastore Issues related to the googleapis/nodejs-datastore API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants