Skip to content

Commit 11129b0

Browse files
authored
test: stabilize tests by adjusting time waiting for mine and price tolerance (#4658) (#4661)
Signed-off-by: Mariusz Jasuwienas <[email protected]>
1 parent aaa082d commit 11129b0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/server/tests/acceptance/hbarLimiter.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () {
334334
});
335335

336336
it('should deploy a large contract and decrease remaining HBAR in limiter when transaction data is large', async function () {
337+
overrideEnvsInMochaDescribe({ TEST_TRANSACTION_RECORD_COST_TOLERANCE: 0.25 });
337338
const initialRemainingHbars = Number(await metrics.get(testConstants.METRICS.REMAINING_HBAR_LIMIT));
338339
expect(initialRemainingHbars).to.be.gt(0);
339340

packages/server/tests/acceptance/rpc_batch1.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,31 +688,31 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
688688

689689
it('should not cache "latest" block in "eth_getBlockByNumber" ', async function () {
690690
const blockResult = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['latest', false]);
691-
await Utils.wait(1000);
691+
await Utils.wait(2000);
692692

693693
const blockResult2 = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['latest', false]);
694694
expect(blockResult).to.not.deep.equal(blockResult2);
695695
});
696696

697697
it('should not cache "finalized" block in "eth_getBlockByNumber" ', async function () {
698698
const blockResult = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['finalized', false]);
699-
await Utils.wait(1000);
699+
await Utils.wait(2000);
700700

701701
const blockResult2 = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['finalized', false]);
702702
expect(blockResult).to.not.deep.equal(blockResult2);
703703
});
704704

705705
it('should not cache "safe" block in "eth_getBlockByNumber" ', async function () {
706706
const blockResult = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['safe', false]);
707-
await Utils.wait(1000);
707+
await Utils.wait(2000);
708708

709709
const blockResult2 = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['safe', false]);
710710
expect(blockResult).to.not.deep.equal(blockResult2);
711711
});
712712

713713
it('should not cache "pending" block in "eth_getBlockByNumber" ', async function () {
714714
const blockResult = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['pending', false]);
715-
await Utils.wait(1000);
715+
await Utils.wait(2000);
716716

717717
const blockResult2 = await relay.call(RelayCalls.ETH_ENDPOINTS.ETH_GET_BLOCK_BY_NUMBER, ['pending', false]);
718718
expect(blockResult).to.not.deep.equal(blockResult2);

0 commit comments

Comments
 (0)