Skip to content

Commit

Permalink
Re-generate library using /synth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot committed Sep 22, 2018
1 parent 20299ba commit da53ba3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .circleci/npm-install-retry.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn;
//USE: ./index.js <ms npm can be idle> <number of attempts> [... NPM ARGS]
//

let timeout = process.argv[2] || 60000;
let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000;
let attempts = process.argv[3] || 3;
let args = process.argv.slice(4);
if (args.length === 0) {
Expand Down
7 changes: 7 additions & 0 deletions .kokoro/presubmit/node8/samples-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-pubsub/.kokoro/samples-test.sh"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/node8/system-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-pubsub/.kokoro/system-test.sh"
}
14 changes: 6 additions & 8 deletions smoke-test/publisher_smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

describe('PublisherSmokeTest', () => {
if (!process.env.GCLOUD_PROJECT) {
throw new Error('Usage: GCLOUD_PROJECT=<project_id> node #{$0}');
throw new Error("Usage: GCLOUD_PROJECT=<project_id> node #{$0}");
}
const projectId = process.env.GCLOUD_PROJECT;

Expand All @@ -30,8 +30,7 @@ describe('PublisherSmokeTest', () => {
// Iterate over all elements.
const formattedProject = client.projectPath(projectId);

client
.listTopics({project: formattedProject})
client.listTopics({project: formattedProject})
.then(responses => {
const resources = responses[0];
for (let i = 0; i < resources.length; i += 1) {
Expand All @@ -52,6 +51,7 @@ describe('PublisherSmokeTest', () => {
// Or obtain the paged response.
const formattedProject = client.projectPath(projectId);


const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
Expand All @@ -67,9 +67,8 @@ describe('PublisherSmokeTest', () => {
// Fetch the next page.
return client.listTopics(nextRequest, options).then(callback);
}
};
client
.listTopics({project: formattedProject}, options)
}
client.listTopics({project: formattedProject}, options)
.then(callback)
.then(done)
.catch(done);
Expand All @@ -83,8 +82,7 @@ describe('PublisherSmokeTest', () => {
});

const formattedProject = client.projectPath(projectId);
client
.listTopicsStream({project: formattedProject})
client.listTopicsStream({project: formattedProject})
.on('data', element => {
console.log(element);
})
Expand Down
8 changes: 6 additions & 2 deletions src/v1/publisher_client_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"http_get": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [],
"one_plus_delivery": [
"ABORTED",
"CANCELLED",
Expand All @@ -14,8 +19,7 @@
"RESOURCE_EXHAUSTED",
"UNAVAILABLE",
"UNKNOWN"
],
"non_idempotent": []
]
},
"retry_params": {
"default": {
Expand Down
8 changes: 6 additions & 2 deletions src/v1/subscriber_client_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [],
"pull": [
"CANCELLED",
"DEADLINE_EXCEEDED",
"INTERNAL",
"RESOURCE_EXHAUSTED",
"UNAVAILABLE"
]
],
"http_get": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": []
},
"retry_params": {
"default": {
Expand Down

0 comments on commit da53ba3

Please sign in to comment.