Skip to content

Commit b09dfe0

Browse files
chore(txm): fix tests
1 parent 3ef1494 commit b09dfe0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/txm/test/txm.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,16 @@ test("Finalized transactions are automatically purged from db after finalizedTra
722722
})
723723

724724
test("RPC liveness monitor works correctly", async () => {
725+
proxyServer.setMode(ProxyMode.Deterministic)
726+
727+
while (!txm.rpcLivenessMonitor.isAlive) {
728+
const transaction = await createCounterTransaction()
729+
730+
transactionQueue.push(transaction)
731+
732+
await mineBlock()
733+
}
734+
725735
proxyServer.setMode(ProxyMode.Random, {
726736
[ProxyBehavior.NotAnswer]: 0,
727737
[ProxyBehavior.Fail]: 0.5,
@@ -739,6 +749,8 @@ test("RPC liveness monitor works correctly", async () => {
739749
isUpHookTriggered = true
740750
})
741751

752+
753+
742754
expect(txm.rpcLivenessMonitor.isAlive).toBe(true)
743755

744756
while (txm.rpcLivenessMonitor.isAlive) {

0 commit comments

Comments
 (0)