Skip to content

Commit

Permalink
Add delay to precompile tests to avoid flakiness
Browse files Browse the repository at this point in the history
I don't know why it is necessary, but this changes the behaviour from
extremely flaky to success across all tests in all of 50 runs.
  • Loading branch information
karlb committed Jun 20, 2023
1 parent 0ee4217 commit ce67d70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe("BLS12-377", function () {
const contractJSON = fs.readFileSync("../../compiled-system-contracts/BLS12_377Passthrough.json", 'utf8');
const TestContractFactory = ethers.ContractFactory.fromSolidity(contractJSON, signer);
instance = await TestContractFactory.deploy();
await new Promise(f => setTimeout(f, 100));
});

it("fpNormal works", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe("BLS12-381", function () {
const contractJSON = fs.readFileSync("../../compiled-system-contracts/BLS12_381Passthrough.json", 'utf8');
const TestContractFactory = ethers.ContractFactory.fromSolidity(contractJSON, signer);
instance = await TestContractFactory.deploy();
await new Promise(f => setTimeout(f, 100));
});

it("fpNormal works", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe("CIP20", function () {
const contractJSON = fs.readFileSync("../../compiled-system-contracts/CIP20Test.json", 'utf8');
const CIP20TestFactory = ethers.ContractFactory.fromSolidity(contractJSON, signer);
cip20 = await CIP20TestFactory.deploy();
await new Promise(f => setTimeout(f, 100));
});

it("should run hashes", async () => {
Expand Down

0 comments on commit ce67d70

Please sign in to comment.