Skip to content

Commit

Permalink
fix api runtime disconnect warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Mar 23, 2024
1 parent 319978e commit 16a7665
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/e2e/src/import-storage/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ describe('import-storage', () => {
await expect(overrideStorage(chain, path.join(__dirname, 'storage.error.storage.yml'))).rejects.toThrowError(
'Cannot find storage MMembers in pallet TechnicalCommittee',
)
// fixes api runtime disconnect warning
await new Promise((r) => setTimeout(r, 50))
})

it('wasm override works', async () => {
Expand Down
9 changes: 9 additions & 0 deletions packages/e2e/src/resume.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ describe('resume', async () => {
const loadedHead = await newAcala.chain.getBlockAt(newHeadNumber)

expect(loadedHead?.hash).toEqual(savedHeadHash)
// fixes api runtime disconnect warning
await new Promise((r) => setTimeout(r, 50))
await newAcala.teardown()
})

Expand All @@ -63,6 +65,8 @@ describe('resume', async () => {
const newHeadNumber = newAcala.chain.head.number

expect(newHeadNumber).toEqual(3000001)
// fixes api runtime disconnect warning
await new Promise((r) => setTimeout(r, 50))
await newAcala.teardown()
})

Expand All @@ -75,6 +79,8 @@ describe('resume', async () => {
const loadedHead = await newAcala.chain.getBlockAt(newHeadNumber)

expect(loadedHead?.hash).toEqual(savedHeadHash)
// fixes api runtime disconnect warning
await new Promise((r) => setTimeout(r, 50))
await newAcala.teardown()
})

Expand All @@ -96,6 +102,9 @@ describe('resume', async () => {
expect(loadedAcalaHead.hash).toEqual(savedAcalaHash)
expect(loadedPolkadotHead.hash).toEqual(savedPolkadotHash)

// fixes api runtime disconnect warning
await new Promise((r) => setTimeout(r, 50))

await acala.teardown()
await polkadot.teardown()
})
Expand Down

0 comments on commit 16a7665

Please sign in to comment.