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

docs(samples): updated samples code to use async await #385

Merged
merged 3 commits into from
Oct 23, 2018

Conversation

vijay-qlogic
Copy link
Contributor

@vijay-qlogic vijay-qlogic commented Oct 22, 2018

Fixes googleapis/google-cloud-node#2869 (it's a good idea to open an issue first for discussion)

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

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

This is a great start! Already looking a lot cleaner.

samples/batch.js Outdated
console.error('ERROR:', err);
});
try {
const data = await transaction.createQueryPartitions(query);

This comment was marked as spam.

samples/batch.js Outdated
const data = await transaction.createQueryPartitions(query);
const partitions = data[0];
console.log(`Successfully created ${partitions.length} query partitions.`);
} catch (err) {

This comment was marked as spam.

t.regex(output, /Successfully deleted 5 records/);
}
);
// // update_data

This comment was marked as spam.

@JustinBeckwith JustinBeckwith changed the title updated samples code to use async await docs(samples): updated samples code to use async await Oct 22, 2018
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 22, 2018
@JustinBeckwith JustinBeckwith added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Oct 22, 2018
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 22, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 22, 2018
@codecov
Copy link

codecov bot commented Oct 22, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@f37ddc8). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #385   +/-   ##
=========================================
  Coverage          ?   99.54%           
=========================================
  Files             ?       12           
  Lines             ?     1323           
  Branches          ?        0           
=========================================
  Hits              ?     1317           
  Misses            ?        6           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f37ddc8...230fe3b. Read the comment docs.

@ghost ghost assigned JustinBeckwith Oct 22, 2018
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 22, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 22, 2018
@JustinBeckwith
Copy link
Contributor

Looks like the system tests are still failin

@vijay-qlogic
Copy link
Contributor Author

vijay-qlogic commented Oct 23, 2018 via email

@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@JustinBeckwith
Copy link
Contributor

@vijay-qlogic I sent you an invite to the googleapis org. If you accept that, sample and system tests will run automatically on these PRs :)

@vijay-qlogic
Copy link
Contributor Author

@JustinBeckwith Yes, I accepted that invitation Thanks!, also enabled 2-factor authentication as well
Few tests are still failing for me, working on it to fix the issues, will update the PR as soon I resolve those

@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@@ -122,7 +119,7 @@ function readWriteTransaction(instanceId, databaseId, projectId) {
const transferAmount = 200000;
const minimumAmountToTransfer = 300000;

database.runTransaction((err, transaction) => {
database.runTransaction(async (err, transaction) => {

This comment was marked as spam.

@JustinBeckwith JustinBeckwith merged commit 5bf0720 into googleapis:master Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants