Skip to content

Commit

Permalink
fix(z:acceptance): fix flakey z:acceptance/vaults.test.js (#10643)
Browse files Browse the repository at this point in the history
closes: #10599

## Description

#10599 pointed out a flakiness in `z:acceptance/vaults.test.js`. Investigations showed the problem was because of the batched IST fee which is charged for every 10 offers for a given user. We started using `tryISTBalance` instead of a direct assertion. 

### Security Considerations

None.

### Scaling Considerations

Making sure there are no flakiness in `a3p-integration/z:acceptance` tests is important as it  affects other PRs in the CI. This should fix one of the discovered ones.

### Documentation Considerations

None.

### Testing Considerations

This should unblock other PRs CI process. No other considerations.

### Upgrade Considerations

`z:acceptance` tests run before every upgrade.
  • Loading branch information
mergify[bot] authored Dec 9, 2024
2 parents 56d1c14 + 82447f3 commit 74ab972
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions a3p-integration/proposals/z:acceptance/vaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ test.serial('user cannot open a vault above debt limit', async t => {
);
});

// TODO #10599. marked as `skip` since several flakes were observed
test.skip('user can open a vault under debt limit', async t => {
test.serial('user can open a vault under debt limit', async t => {
const istBalanceBefore = await getISTBalance(GOV1ADDR);
const activeVaultsBefore = await listVaults(GOV1ADDR, walletUtils);

Expand All @@ -241,11 +240,12 @@ test.skip('user can open a vault under debt limit', async t => {
const istBalanceAfter = await getISTBalance(GOV1ADDR);
const activeVaultsAfter = await listVaults(GOV1ADDR, walletUtils);

t.is(
istBalanceBefore + Number(mint),
istBalanceAfter,
'The IST balance should increase by the minted amount',
await tryISTBalances(
t,
scale6(istBalanceAfter),
scale6(istBalanceBefore + Number(mint)),
);

t.is(
activeVaultsAfter.length,
activeVaultsBefore.length + 1,
Expand Down

0 comments on commit 74ab972

Please sign in to comment.