Skip to content

Commit b0354e4

Browse files
authored
ci: fix client integration failure (#1740)
* fix failing node-versions ci race condition
1 parent fe39fea commit b0354e4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/client/test/integration/fullsync.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ tape('[Integration:FullSync]', async (t) => {
4444
localService.config.events.on(Event.SYNC_SYNCHRONIZED, async () => {
4545
if (localService.chain.blocks.height.toNumber() === 10) {
4646
t.pass('synced with best peer')
47+
await destroy(localServer, localService)
4748
await destroy(remoteServer1, remoteService1)
4849
await destroy(remoteServer2, remoteService2)
49-
await destroy(localServer, localService)
5050
}
5151
})
5252
await localService.synchronizer.start()

packages/client/test/integration/mocks/mockserver.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@ export default class MockServer extends Server {
4242
}
4343

4444
async stop(): Promise<boolean> {
45-
await new Promise((resolve) => {
46-
setTimeout(() => {
47-
destroyServer(this.location)
48-
resolve(undefined)
49-
}, 20)
50-
})
45+
await this.wait(20)
46+
destroyServer(this.location)
5147
await super.stop()
5248
return this.started
5349
}

0 commit comments

Comments
 (0)