diff --git a/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts b/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts index f0bc4d5c2ca..e51b4b5d5f3 100644 --- a/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts +++ b/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts @@ -105,6 +105,7 @@ describe('rpc with block', () => { from: acc.address, value: '0x1', times: 1, + waitAfterEachSend: 500, }); const data = { pending: 'pending', @@ -124,7 +125,7 @@ describe('rpc with block', () => { from: acc.address, value: '0x1', times: count, - waitAfterEachSend: 200, + waitAfterEachSend: 500, }); const receiptAfter = res[res.length - 1]; const dataAfter = { diff --git a/packages/web3-eth/test/integration/helper.ts b/packages/web3-eth/test/integration/helper.ts index aa388d5504d..0504b95b5fb 100644 --- a/packages/web3-eth/test/integration/helper.ts +++ b/packages/web3-eth/test/integration/helper.ts @@ -62,6 +62,7 @@ export const sendFewTxes = async ({ }), ); if (waitAfterEachSend) { + // to ensure the block got mined on dev environment // eslint-disable-next-line no-await-in-loop await new Promise(resolve => { setTimeout(resolve, waitAfterEachSend);