Skip to content

Commit

Permalink
Add timeout for some failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kourin1996 committed Dec 10, 2024
1 parent 8ea1377 commit 17f2f15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions e2e_test/js-tests/test_ethers_tx.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("ethers.js send tx", () => {
value: 1,
});
const receipt = await tx.wait();
}).timeout(10_000);
}).timeout(20_000);
});

describe("ethers.js compatibility tests with state", () => {
Expand All @@ -22,7 +22,7 @@ describe("ethers.js compatibility tests with state", () => {
// These assertions trigger on undefined or null
assert.notEqual(block, null);
assert.notEqual(block.gasLimit, null);
});
})

it("EIP-1559 transactions supported (can get feeData)", async () => {
const feeData = await provider.getFeeData();
Expand All @@ -32,21 +32,21 @@ describe("ethers.js compatibility tests with state", () => {
assert.notEqual(feeData.maxFeePerGas, null);
assert.notEqual(feeData.maxPriorityFeePerGas, null);
assert.notEqual(feeData.gasPrice, null);
});
}).timeout(5_000);;

it("block has gasLimit", async () => {
const fullBlock = await provider.send("eth_getBlockByNumber", [
"latest",
true,
]);
assert.isTrue(fullBlock.hasOwnProperty("gasLimit"));
});
})

it("block has baseFeePerGas", async () => {
const fullBlock = await provider.send("eth_getBlockByNumber", [
"latest",
true,
]);
assert.isTrue(fullBlock.hasOwnProperty("baseFeePerGas"));
});
})
});
2 changes: 2 additions & 0 deletions e2e_test/run_all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ cd "$SCRIPT_DIR" || exit 1
# To work around this, send a transaction before running tests
cast send --json --private-key "$ACC_PRIVKEY" "$TOKEN_ADDR" 'transfer(address to, uint256 value) returns (bool)' 0x000000000000000000000000000000000000dEaD 100 > /dev/null || true

sleep 5

failures=0
tests=0
echo "Globbing with \"$TEST_GLOB\""
Expand Down

0 comments on commit 17f2f15

Please sign in to comment.