@@ -115,6 +115,7 @@ describe("Ocean CLI Free Compute Flow", function () {
115115 const output = await runCommand (
116116 `npm run cli startFreeCompute --datasets ${ computeDatasetDid } --algo ${ algoDid } --env ${ computeEnvId } `
117117 ) ;
118+ console . log ( "Start Free Compute output:" , output ) ;
118119
119120 const jobIdMatch = output . match (
120121 / C o m p u t e s t a r t e d \. \s + J o b I D : \s + ( 0 x [ a - f 0 - 9 - ] + ) / i
@@ -162,6 +163,7 @@ describe("Ocean CLI Free Compute Flow", function () {
162163 . replace ( / : \s * ' ( [ ^ ' ] * ?) ' / g, ': "$1"' ) ;
163164
164165 jobs = JSON . parse ( jsonStr ) ;
166+ console . log ( "Parsed job status JSON:" , jobs ) ;
165167 } catch ( e ) {
166168 console . warn ( "Failed to parse job status JSON, will retry..." ) ;
167169 await new Promise ( ( res ) => setTimeout ( res , pollIntervalMs ) ) ;
@@ -170,14 +172,13 @@ describe("Ocean CLI Free Compute Flow", function () {
170172
171173 if ( Array . isArray ( jobs ) && jobs . length > 0 ) {
172174 const job = jobs [ 0 ] ;
173- if (
174- ( typeof job . statusText === "string" &&
175- job . statusText . toLowerCase ( ) . includes ( "finished" ) ) ||
176- job . status === 70
177- ) {
175+ console . log ( "jobs[0] :" , jobs [ 0 ] ) ;
176+ if ( job . status === 70 ) {
178177 console . log ( "Job is finished!" ) ;
179178 return job ;
180179 }
180+ } else {
181+ console . warn ( "No jobs found in the output, will retry..." ) ;
181182 }
182183
183184 await new Promise ( ( res ) => setTimeout ( res , pollIntervalMs ) ) ;
@@ -186,6 +187,7 @@ describe("Ocean CLI Free Compute Flow", function () {
186187 `Job ${ jobId } did not finish within ${ maxWaitMs / 1000 } seconds`
187188 ) ;
188189 } ;
190+
189191 it ( "should download compute job results" , async ( ) => {
190192 const job = await waitForJobCompletion (
191193 computeDatasetDid ,
0 commit comments