-
Notifications
You must be signed in to change notification settings - Fork 604
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
system tests: search: delete documents individually #784
system tests: search: delete documents individually #784
Conversation
That's backwards right ? You can't currently delete indexes, and you
accomplish the same result by deleting all of the documents in the index.
Right ?
|
Yep, thanks. Will fix that in the first post. |
@@ -67,12 +56,8 @@ describe('Search', function() { | |||
var INDEX_NAME = generateIndexName(); | |||
var index = search.index(INDEX_NAME); | |||
|
|||
before(function(done) { | |||
deleteAllDocuments(done); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
system tests: search: delete documents individually
Travis will be so happy! (I hope!) |
@stephenplusplus We are trying to follow your work on Search, as we're about to start on it for the Ruby lib. Do you think you could create a |
@quartzmo sure, I found a few: https://github.com/GoogleCloudPlatform/gcloud-node/issues?q=label%3Asearch+is%3Aclosed I don't think we've had that many. Let me know if any questions come up. |
samples: pull in latest typeless bot, clean up some comments Source-Link: https://github.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e
🤖 I have created a release *beep* *boop* --- ## [4.3.0](https://github.com/googleapis/nodejs-dlp/compare/v4.2.0...v4.3.0) (2023-01-06) ### Features * ExcludeByHotword added as an ExclusionRule type, NEW_ZEALAND added as a LocationCategory value ([5b54b2e](https://github.com/googleapis/nodejs-dlp/commit/5b54b2e9c63acee3022089d9fb94d8b1907c1eb2)) ### Bug Fixes * Deprecate extra field to avoid confusion ([#777](https://github.com/googleapis/nodejs-dlp/issues/777)) ([f6a7ebd](https://github.com/googleapis/nodejs-dlp/commit/f6a7ebde9f78440600ac178a568e3fe79ccfadc2)) * **deps:** Use google-gax v3.5.2 ([#781](https://github.com/googleapis/nodejs-dlp/issues/781)) ([3601ed8](https://github.com/googleapis/nodejs-dlp/commit/3601ed84fa97958ca52bdc8d5620317f1a4a1de5)) * Regenerated protos JS and TS definitions ([#784](https://github.com/googleapis/nodejs-dlp/issues/784)) ([fa109f0](https://github.com/googleapis/nodejs-dlp/commit/fa109f05c3a29473a330e96b20e89480fb89496e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* fix: failing tests for LRO check methods Updated gapic-generator-typescript to v2.1.1. Committer: @alexander-fenster PiperOrigin-RevId: 387841814 Source-Link: googleapis/googleapis@f973532 Source-Link: googleapis/googleapis-gen@acb489d * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [4.5.6](https://github.com/googleapis/nodejs-speech/compare/v4.5.5...v4.5.6) (2021-08-02) ### Bug Fixes * failing tests for LRO check methods ([#784](https://github.com/googleapis/nodejs-speech/issues/784)) ([08e4276](https://github.com/googleapis/nodejs-speech/commit/08e4276a39a74a45300041278dc3c63602971c10)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* fix: failing tests for LRO check methods Updated gapic-generator-typescript to v2.1.1. Committer: @alexander-fenster PiperOrigin-RevId: 387841814 Source-Link: googleapis/googleapis@f973532 Source-Link: googleapis/googleapis-gen@acb489d * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [4.5.6](https://github.com/googleapis/nodejs-speech/compare/v4.5.5...v4.5.6) (2021-08-02) ### Bug Fixes * failing tests for LRO check methods ([#784](https://github.com/googleapis/nodejs-speech/issues/784)) ([08e4276](https://github.com/googleapis/nodejs-speech/commit/08e4276a39a74a45300041278dc3c63602971c10)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
RE: #775 (comment)
The Search API doesn't allow indexes to be deleted. Instead, you can delete all of the documents within them. That's what we were doing previously, but as the amount of created Documents grows, it's taking an excessive amount of time to fetch, then iteratively delete each one that exists.
This PR changes the tests to create/delete a document, instead of letting the before/after hooks handle it the old way.