@@ -19,16 +19,16 @@ let jobId3 = ''
19
19
let tokenUidDev = ''
20
20
let tokenUid = ''
21
21
22
- function delay ( ms ) {
22
+ function delay ( ms ) {
23
23
return new Promise ( resolve => setTimeout ( resolve , ms ) )
24
24
}
25
25
26
- async function waitForJobReady ( jobId , maxAttempts = 10 ) {
26
+ async function waitForJobReady ( jobId , maxAttempts = 10 ) {
27
27
for ( let attempt = 1 ; attempt <= maxAttempts ; attempt ++ ) {
28
28
try {
29
29
const response = await doBulkOperationWithManagementToken ( tokenUidDev )
30
30
. jobStatus ( { job_id : jobId , api_version : '3.2' } )
31
-
31
+
32
32
if ( response && response . status ) {
33
33
return response
34
34
}
@@ -168,7 +168,7 @@ describe('BulkOperation api test', () => {
168
168
169
169
it ( 'should wait for jobs to be ready and get job status for the first publish job' , async ( ) => {
170
170
const response = await waitForJobReady ( jobId1 )
171
-
171
+
172
172
expect ( response ) . to . not . equal ( undefined )
173
173
expect ( response . uid ) . to . not . equal ( undefined )
174
174
expect ( response . status ) . to . not . equal ( undefined )
@@ -179,7 +179,7 @@ describe('BulkOperation api test', () => {
179
179
180
180
it ( 'should validate detailed job status response structure' , async ( ) => {
181
181
const response = await waitForJobReady ( jobId1 )
182
-
182
+
183
183
expect ( response ) . to . not . equal ( undefined )
184
184
// Validate main job properties
185
185
expect ( response . uid ) . to . not . equal ( undefined )
@@ -196,7 +196,7 @@ describe('BulkOperation api test', () => {
196
196
197
197
it ( 'should get job status for the second publish job' , async ( ) => {
198
198
const response = await waitForJobReady ( jobId2 )
199
-
199
+
200
200
expect ( response ) . to . not . equal ( undefined )
201
201
expect ( response . uid ) . to . not . equal ( undefined )
202
202
expect ( response . status ) . to . not . equal ( undefined )
@@ -207,7 +207,7 @@ describe('BulkOperation api test', () => {
207
207
208
208
it ( 'should get job status for the third publish job' , async ( ) => {
209
209
const response = await waitForJobReady ( jobId3 )
210
-
210
+
211
211
expect ( response ) . to . not . equal ( undefined )
212
212
expect ( response . uid ) . to . not . equal ( undefined )
213
213
expect ( response . status ) . to . not . equal ( undefined )
@@ -218,10 +218,10 @@ describe('BulkOperation api test', () => {
218
218
219
219
it ( 'should get job status with bulk_version parameter' , async ( ) => {
220
220
await waitForJobReady ( jobId1 )
221
-
221
+
222
222
const response = await doBulkOperationWithManagementToken ( tokenUidDev )
223
223
. jobStatus ( { job_id : jobId1 , bulk_version : 'v3' , api_version : '3.2' } )
224
-
224
+
225
225
expect ( response ) . to . not . equal ( undefined )
226
226
expect ( response . uid ) . to . not . equal ( undefined )
227
227
expect ( response . status ) . to . not . equal ( undefined )
0 commit comments