diff --git a/lib/jormungandr/test/integration/Test/Integration/Jormungandr/Scenario/API/StakePools.hs b/lib/jormungandr/test/integration/Test/Integration/Jormungandr/Scenario/API/StakePools.hs index e0753caa1a1..29918b0792e 100644 --- a/lib/jormungandr/test/integration/Test/Integration/Jormungandr/Scenario/API/StakePools.hs +++ b/lib/jormungandr/test/integration/Test/Integration/Jormungandr/Scenario/API/StakePools.hs @@ -27,6 +27,8 @@ import Cardano.Wallet.Primitive.AddressDerivation ) import Cardano.Wallet.Primitive.Types ( Direction (..), PoolId (..), TxStatus (..), WalletDelegation (..) ) +import Control.Arrow + ( second ) import Control.Monad ( forM_ ) import Data.Functor.Identity @@ -34,9 +36,11 @@ import Data.Functor.Identity import Data.Generics.Internal.VL.Lens ( view, (^.) ) import Data.List - ( find ) + ( find, sortOn ) import Data.Maybe ( isJust, isNothing ) +import Data.Ord + ( Down (..) ) import Data.Proxy ( Proxy (..) ) import Data.Quantity @@ -123,7 +127,7 @@ spec = do -- For some reason, the first pool (the node we run), produces -- blocks in 100% of the /slots/. This means it will have produced -- either 1 or 2 blocks in the current epoch. - verify r + verify (second (fmap (sortOn (Down . view #apparentPerformance))) r) [ expectListSizeEqual 3 , expectListItemFieldSatisfy 0