Skip to content

Commit

Permalink
Make one integration test a little less fragile (#4133)
Browse files Browse the repository at this point in the history
Wallet doesn't update the delegation status immediately, so for some
short amount of time integration tests observe outdated status. The
`eventually` combinator retries until success or timeout.
  • Loading branch information
Unisay authored Sep 27, 2023
2 parents b02c21c + a140b59 commit 13c8cb9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,10 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do

waitNumberOfEpochBoundaries 2 ctx

request @ApiWallet ctx (Link.getWallet @'Shelley w) Default Empty
>>= flip verify
[expectField #delegation (`shouldBe` delegating (ApiT pool2) [])]
eventually "Wallet is now delegating to pool2" $ do
request @ApiWallet ctx (Link.getWallet @'Shelley w) Default Empty
>>= flip verify
[expectField #delegation (`shouldBe` delegating (ApiT pool2) [])]

it "STAKE_POOLS_JOIN_04 - Rewards accumulate" $ \ctx -> runResourceT $ do
w <- fixtureWallet ctx
Expand Down

0 comments on commit 13c8cb9

Please sign in to comment.