Skip to content

Commit 0f78d3c

Browse files
angelcaamaliennae
andauthored
test(talent): add explicit delay to wait for job indexing (GoogleCloudPlatform#4317)
* test(talent): add explicit delay to wait for job indexing * test(talent): move indexing delay to before hook to avoid waiting on every retry --------- Co-authored-by: Jennifer Davis <sigje@google.com>
1 parent 2d3cd72 commit 0f78d3c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

talent/test/talent.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describe('Talent Solution Jobs API v4 samples', () => {
4747
const tenantService = new talent.TenantServiceClient();
4848
const companyService = new talent.CompanyServiceClient();
4949
const jobService = new talent.JobServiceClient();
50+
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
5051

5152
let tenant;
5253
let company;
@@ -101,6 +102,7 @@ describe('Talent Solution Jobs API v4 samples', () => {
101102
});
102103
console.log(`created job: ${job.name}`);
103104
jobId = job.name.split('/').slice(-1)[0];
105+
await delay(10000);
104106
});
105107

106108
after(async () => {

0 commit comments

Comments
 (0)