Skip to content

Commit 764501a

Browse files
testing delayed deploy
1 parent f401985 commit 764501a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

packages/ens-test-env/src/manager.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export const main = async (_config, _options, justKill) => {
254254
await awaitCommand('deploy', config.deployCommand)
255255

256256
// wait for anvil deploy to finish
257-
await new Promise((resolve) => setTimeout(resolve, 5000))
257+
await new Promise((resolve) => setTimeout(resolve, 100))
258258

259259
// remove block timestamp interval after deploy
260260
await rpcFetch('anvil_removeBlockTimestampInterval', [])
@@ -283,7 +283,14 @@ export const main = async (_config, _options, justKill) => {
283283

284284
if (options.graph) {
285285
try {
286-
await compose.upAll(opts)
286+
console.log('Starting postgres...')
287+
await compose.upOne('postgres', opts)
288+
console.log('Starting ipfs...')
289+
await compose.upOne('ipfs', opts)
290+
console.log('Starting graph-node...')
291+
await compose.upOne('graph-node', opts)
292+
console.log('Starting metadata...')
293+
// await compose.upOne('metadata', opts)
287294
} catch {}
288295

289296
await waitOn({ resources: ['http://localhost:8040'] })
@@ -372,13 +379,19 @@ export const main = async (_config, _options, justKill) => {
372379
})
373380
.catch(() => 0)
374381
do {
382+
const index = await getCurrentIndex()
383+
console.log('current index:', index)
375384
indexArray.push(await getCurrentIndex())
376385
if (indexArray.length > 10) indexArray.shift()
377-
await new Promise((resolve) => setTimeout(resolve, 100))
386+
await new Promise((resolve) => setTimeout(resolve, 1000))
387+
if (indexArray.every((i) => i === indexArray[0]) && indexArray.length === 10) {
388+
return cleanup(undefined, 0)
389+
}
378390
} while (
379-
!indexArray.every((i) => i === indexArray[0]) ||
380-
indexArray.length < 2 ||
381-
indexArray[0] === 0
391+
indexArray[indexArray.length - 1] < 326
392+
// !indexArray.every((i) => i === indexArray[0]) ||
393+
// indexArray.length < 2 ||
394+
// indexArray[0] === 0
382395
)
383396
}
384397
/**

0 commit comments

Comments
 (0)