mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
more debug
This commit is contained in:
parent
b7fd131421
commit
1965ceae6a
@ -342,7 +342,7 @@ async function handleOrder(
|
|||||||
return tx.transactionHash
|
return tx.transactionHash
|
||||||
}
|
}
|
||||||
|
|
||||||
function delay(interval) {
|
function delay(interval: number) {
|
||||||
return it('should delay', (done) => {
|
return it('should delay', (done) => {
|
||||||
setTimeout(() => done(), interval)
|
setTimeout(() => done(), interval)
|
||||||
}).timeout(interval + 100)
|
}).timeout(interval + 100)
|
||||||
@ -443,10 +443,10 @@ describe('Simple compute tests', async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('should start a computeJob using the free environment', async () => {
|
it('should start a computeJob using the free environment', async () => {
|
||||||
// let's have 1 minute of compute access
|
// let's have 2 minute of compute access
|
||||||
const mytime = new Date()
|
const mytime = new Date()
|
||||||
console.log('my time', mytime)
|
console.log('my time', mytime.getTime() / 1000)
|
||||||
const computeMinutes = 1
|
const computeMinutes = 2
|
||||||
mytime.setMinutes(mytime.getMinutes() + computeMinutes)
|
mytime.setMinutes(mytime.getMinutes() + computeMinutes)
|
||||||
computeValidUntil = Math.floor(mytime.getTime() / 1000)
|
computeValidUntil = Math.floor(mytime.getTime() / 1000)
|
||||||
console.log('compute valid until ==', computeValidUntil)
|
console.log('compute valid until ==', computeValidUntil)
|
||||||
@ -574,7 +574,7 @@ describe('Simple compute tests', async () => {
|
|||||||
assert(computeJobs, 'Cannot start compute job')
|
assert(computeJobs, 'Cannot start compute job')
|
||||||
})
|
})
|
||||||
|
|
||||||
delay(50000)
|
delay(90000)
|
||||||
|
|
||||||
it('Check compute status', async () => {
|
it('Check compute status', async () => {
|
||||||
const jobStatus = (await ProviderInstance.computeStatus(
|
const jobStatus = (await ProviderInstance.computeStatus(
|
||||||
@ -583,7 +583,7 @@ describe('Simple compute tests', async () => {
|
|||||||
freeComputeJobId,
|
freeComputeJobId,
|
||||||
resolvedDdoWith1mTimeout.id
|
resolvedDdoWith1mTimeout.id
|
||||||
)) as ComputeJob
|
)) as ComputeJob
|
||||||
console.log('jobStatus = ', jobStatus.statusText)
|
console.log('jobStatus = ', jobStatus)
|
||||||
assert(jobStatus, 'Cannot retrieve compute status!')
|
assert(jobStatus, 'Cannot retrieve compute status!')
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -617,7 +617,8 @@ describe('Simple compute tests', async () => {
|
|||||||
serviceId: resolvedAlgoDdoWith1mTimeout.services[0].id,
|
serviceId: resolvedAlgoDdoWith1mTimeout.services[0].id,
|
||||||
transferTxId: freeEnvAlgoTxId
|
transferTxId: freeEnvAlgoTxId
|
||||||
}
|
}
|
||||||
console.log('current time == ', new Date())
|
const mytime = new Date()
|
||||||
|
console.log('my time', mytime.getTime() / 1000)
|
||||||
console.log('compute valid until ==', computeValidUntil)
|
console.log('compute valid until ==', computeValidUntil)
|
||||||
providerInitializeComputeResults = await ProviderInstance.initializeCompute(
|
providerInitializeComputeResults = await ProviderInstance.initializeCompute(
|
||||||
assets,
|
assets,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user