We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 606e24f commit 77140f5Copy full SHA for 77140f5
tests/job-client.test.js
@@ -115,9 +115,26 @@ test(
115
}
116
)
117
.then(
118
- (jobIdentifier)=>{
119
- logger.debug(`testCancelJob :: canceling job :: ${jobIdentifier}`);
120
- return jobClient.cancelJob(jobIdentifier);
+ (jobIdentifier) => {
+ return new Promise(
+ (resolve, reject) => {
121
+ setTimeout(
122
+ () => {
123
+ resolve(jobClient.getJob(jobIdentifier));
124
+ },
125
+ 5000
126
+ );
127
+ }
128
129
130
+ )
131
+ .then(
132
+ (job)=>{
133
+ if( job.status != "COMPLETED" ){
134
+ logger.debug(`testCancelJob :: canceling job :: ${job.jobIdentifier}`);
135
+ return jobClient.cancelJob(job.jobIdentifier);
136
137
+ return job;
138
139
140
0 commit comments