mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Add retries to scenarios to prevent random networking bug.
This commit is contained in:
parent
3f6dd8a0f0
commit
f106502c72
|
@ -62,11 +62,8 @@ export const advanceTimeAndBlock = async function (forwardTime: number) {
|
|||
}
|
||||
const currentTime = currentBlock.timestamp;
|
||||
const futureTime = currentTime + forwardTime;
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
await DRE.ethers.provider.send('evm_setNextBlockTimestamp', [futureTime]);
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
await DRE.ethers.provider.send('evm_mine', []);
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
};
|
||||
|
||||
export const waitForTx = async (tx: ContractTransaction) => await tx.wait(1);
|
||||
|
|
|
@ -34,7 +34,8 @@ fs.readdirSync(scenarioFolder).forEach((file) => {
|
|||
});
|
||||
|
||||
for (const story of scenario.stories) {
|
||||
it(story.description, async () => {
|
||||
it(story.description, async function () {
|
||||
this.retries(4);
|
||||
await executeStory(story, testEnv);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user