From 95cf71282779472847a5c23452e1ef2d02121467 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 13 Oct 2021 12:50:42 -0400 Subject: [PATCH] test: extend timeout for flaky tests (#567) --- packages/google-cloud-asset/samples/package.json | 2 +- packages/google-cloud-asset/samples/test/sample.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-asset/samples/package.json b/packages/google-cloud-asset/samples/package.json index ae1ab6cf42ab..52399fdc65ad 100644 --- a/packages/google-cloud-asset/samples/package.json +++ b/packages/google-cloud-asset/samples/package.json @@ -12,7 +12,7 @@ "repository": "googleapis/nodejs-asset", "private": true, "scripts": { - "test": "mocha --timeout 180000" + "test": "mocha --timeout 360000" }, "dependencies": { "@google-cloud/asset": "^3.19.0", diff --git a/packages/google-cloud-asset/samples/test/sample.test.js b/packages/google-cloud-asset/samples/test/sample.test.js index 343b8b17123a..21b1baf8378f 100644 --- a/packages/google-cloud-asset/samples/test/sample.test.js +++ b/packages/google-cloud-asset/samples/test/sample.test.js @@ -64,7 +64,7 @@ describe('quickstart sample tests', () => { it('should export assets to specified path', async () => { const dumpFilePath = `gs://${bucketName}/my-assets-${fileSuffix}.txt`; execSync(`node exportAssets ${dumpFilePath}`); - let waitMs = 1000; + let waitMs = 4000; let exists = false; let file; for (let retry = 0; retry < 3 && !exists; ++retry) { @@ -80,7 +80,7 @@ describe('quickstart sample tests', () => { const dumpFilePath = `gs://${bucketName}/my-relationships-${fileSuffix}.txt`; const contentType = 'RELATIONSHIP'; execSync(`node exportAssets ${dumpFilePath} ${contentType}`); - let waitMs = 1000; + let waitMs = 4000; let exists = false; let file; for (let retry = 0; retry < 3 && !exists; ++retry) { @@ -162,7 +162,7 @@ describe('quickstart sample tests', () => { execSync( `node analyzeIamPolicyLongrunningBigquery ${datasetId} ${tablePrefix}` ); - let waitMs = 1000; + let waitMs = 4000; let metadataTable; let metadataTable_exists = false; let resultsTable;