Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Intermittent failures in eth_getCode_9 #1593

Merged
merged 3 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
pull_request:
merge_group:
workflow_dispatch:

# Ensure that only a single job or workflow using the same concurrency group will run at a time.
# see https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
Expand Down
6 changes: 4 additions & 2 deletions tests/e2e/src/eth_getCode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ describe("eth_getCode", () => {
await testType.type("1"); // 0: none params 1: common params to request 2: more params
await param1.type(testDataInfo.accountAddress);
await param2.type(testDataInfo.hexBlockNumber);
await goto.check(page, "0x");
});
// Running eth_getCode_4 and eth_getCode_9 simultaneously causes axonweb3/axon/issues/1579
// temporary solution: just wait 20 seconds after executing eth_getCode_4
await goto.checkAndWait(page, "0x", 20);
sunchengzhu marked this conversation as resolved.
Show resolved Hide resolved
}, 25000);

/**
* param1: real account address but not exist
Expand Down
8 changes: 8 additions & 0 deletions tests/e2e/src/goto.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ const goto = {
await currentpage.waitForFunction(() => document.getElementById("ret").innerText !== "");
await expect(currentpage.$eval("#ret", (e) => e.innerText)).resolves.toMatch(expectedValue);
},

async checkAndWait(currentpage, expectedValue, second) {
await currentpage.click(goto.pageIds.btnId);
await currentpage.waitForFunction(() => document.getElementById("ret").innerText !== "");
await new Promise((resolve) => { setTimeout(resolve, second * 1000); });
await expect(currentpage.$eval("#ret", (e) => e.innerText)).resolves.toMatch(expectedValue);
},

// get the value
async value(currentpage) {
await currentpage.click(goto.pageIds.btnId);
Expand Down
Loading