Skip to content

Commit

Permalink
Chore/fix flaky test failures (#308)
Browse files Browse the repository at this point in the history
* chore: filter fuzzed inputs to fix 2 flaky test failures

1) failure in a test that appears to be due to the fuzzed 'withdrawer' matching a Strategy's address -- see run here https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6672856290/job/18137522930#step:5:46
2) failure in a test when the fuzzed 'staker' address matches a fixed operator address which we are using (the reverting behavior is intended in this case)

* fix one more flaky test failure with fuzzed input filtering

this test fails (appropriately) when the `notUnpauser` input is fuzzed to the ProxyAdmin address

* fix one more flaky test failure

this failed in the following run: https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6697166090/job/18196461283#step:5:116
I dug into it and this was ultimately because the fuzzed `staker` param matched the ProxyAdmin address
  • Loading branch information
ChaoticWalrus authored Oct 30, 2023
1 parent 8120635 commit 92ccacc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/unit/DelegationUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ contract DelegationUnitTests is EigenLayerTestHelper {
* who the `staker` is delegated to has in the strategies
* @dev Checks that there is no change if the staker is not delegated
*/
function testDecreaseDelegatedShares(address staker, IStrategy[] memory strategies, uint128 shares, bool delegateFromStakerToOperator) public {
function testDecreaseDelegatedShares(address staker, IStrategy[] memory strategies, uint128 shares, bool delegateFromStakerToOperator) public filterFuzzedAddressInputs(staker) {
// sanity-filtering on fuzzed input length
cheats.assume(strategies.length <= 32);
// register *this contract* as an operator
Expand Down

0 comments on commit 92ccacc

Please sign in to comment.