Skip to content

Commit cac0b63

Browse files
committed
fix: resolve RESOURCE_EXHAUSTED quota errors in CI pipeline
1 parent 3e40ca7 commit cac0b63

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

contact-center-insights/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"*.js"
1111
],
1212
"scripts": {
13-
"test": "c8 mocha -p -j 2 --timeout 600000 test/*.js"
13+
"test": "c8 mocha --timeout 600000 test/*.js"
1414
},
1515
"dependencies": {
1616
"@google-cloud/bigquery": "^7.0.0",

contact-center-insights/test/createAnalysis.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const delay = async (test, addMs) => {
3636
} // No retry on the first failure.
3737
if (retries === 0) return;
3838
// See: https://cloud.google.com/storage/docs/exponential-backoff
39-
const backoffBase = Math.pow(2, retries) * 1000;
40-
const jitter = Math.random() * 1000;
39+
const backoffBase = Math.pow(2, retries) * 5000;
40+
const jitter = Math.random() * 2000;
4141
const ms = backoffBase + jitter;
4242
return new Promise(done => {
4343
console.info(`retrying "${test.title}" in ${ms}ms`);
@@ -64,7 +64,7 @@ describe('CreateAnalysis', () => {
6464
);
6565

6666
console.info('Waiting for conversation to be ready for analysis...');
67-
await new Promise(resolve => setTimeout(resolve, 15000));
67+
await new Promise(resolve => setTimeout(resolve, 45000));
6868
});
6969

7070
after(() => {

0 commit comments

Comments
 (0)