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: Integration test close function again #1103

Merged

Conversation

danieljbruce
Copy link
Contributor

This fixes an issue with the close function where promises of promises were once returned, but now we simply return a promise so that when we use await then the code is executed properly.

@danieljbruce danieljbruce requested review from a team as code owners June 20, 2022 15:13
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/nodejs-bigtable API. labels Jun 20, 2022
Copy link
Contributor Author

@danieljbruce danieljbruce left a comment

Choose a reason for hiding this comment

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

A comment to clarify the original problem.

@@ -930,7 +930,7 @@ export class Bigtable {
* that a callback is omitted.
*/
promisifyAll(Bigtable, {
exclude: ['instance', 'operation', 'request'],
exclude: ['close', 'instance', 'operation', 'request'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the absence of this change, the test just seems to hang forever.

Copy link
Contributor

Choose a reason for hiding this comment

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

promisifyAll turns a cb based function into a promise based function, it looks like close was already a promise, and did not expect a callback as an argument:

close(): Promise<void[]>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I am making sure the reader of this PR knows why this change is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for clarifying why the test hangs in this PR though!

@danieljbruce danieljbruce changed the title Integration test close function again fix: Integration test close function again Jun 20, 2022
@@ -930,7 +930,7 @@ export class Bigtable {
* that a callback is omitted.
*/
promisifyAll(Bigtable, {
exclude: ['instance', 'operation', 'request'],
exclude: ['close', 'instance', 'operation', 'request'],
Copy link
Contributor

Choose a reason for hiding this comment

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

promisifyAll turns a cb based function into a promise based function, it looks like close was already a promise, and did not expect a callback as an argument:

close(): Promise<void[]>

@danieljbruce danieljbruce added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 6, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 6, 2022
@danieljbruce danieljbruce added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2022
@danieljbruce danieljbruce added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 12, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 12, 2022
@danieljbruce danieljbruce added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@danieljbruce danieljbruce merged commit 10dcd21 into googleapis:main Jul 12, 2022
@shantstepanian shantstepanian added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/nodejs-bigtable API. kokoro:force-run Add this label to force Kokoro to re-run the tests. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants