Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenadia committed Aug 6, 2020
1 parent c13d0f8 commit 8992413
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/p1MirrorOracle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ perpetualDescribe('P1MirrorOracle', init, (ctx: ITestContext) => {

await ctx.perpetual.testing.makerOracle.lift([signers[0]]);
await oracle.lift([signers[0]]);
await ctx.perpetual.testing.makerOracle.lift([newSigner]);
// Use lowercase to avoid address checksum failure.
await ctx.perpetual.testing.makerOracle.lift([newSigner.toLowerCase()]);

// Call the function.
const { signersToAdd, signersToRemove, barNeedsUpdate } = await oracle.checkSyncedDetailed();
Expand Down Expand Up @@ -379,7 +380,8 @@ perpetualDescribe('P1MirrorOracle', init, (ctx: ITestContext) => {

// Authorize it on the underlying oracle.
await ctx.perpetual.testing.makerOracle.drop([signers[2]]);
await ctx.perpetual.testing.makerOracle.lift([newSigner]);
// Use lowercase to avoid address checksum failure.
await ctx.perpetual.testing.makerOracle.lift([newSigner.toLowerCase()]);

await oracle.lift([newSigner]);
await expectThrow(
Expand Down Expand Up @@ -459,7 +461,8 @@ perpetualDescribe('P1MirrorOracle', init, (ctx: ITestContext) => {

// The orcl check will fail, but not the slot check.
await expectThrow(
oracle.drop([newSigner]),
// Use lowercase to avoid address checksum failure.
oracle.drop([newSigner.toLowerCase()]),
'P1MirrorOracle#drop: Signer is already not authorized',
);
});
Expand Down

0 comments on commit 8992413

Please sign in to comment.