Skip to content

fix: Integration test close function again#1103

Merged
danieljbruce merged 12 commits intogoogleapis:mainfrom
danieljbruce:integration-test-close-function-again
Jul 12, 2022
Merged

fix: Integration test close function again#1103
danieljbruce merged 12 commits intogoogleapis:mainfrom
danieljbruce:integration-test-close-function-again

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 a review from a team as a code owner June 20, 2022 15:13
@danieljbruce danieljbruce requested a review from a team 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.

*/
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

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
*/
promisifyAll(Bigtable, {
exclude: ['instance', 'operation', 'request'],
exclude: ['close', 'instance', 'operation', 'request'],
Copy link

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