LGTM
On Thu, Mar 6, 2014 at 2:37 PM, Klaus Aehlig <[email protected]> wrote: > In other words, verify that if all the lock owners release their > locks, the empty lock allocation is reached. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > test/hs/Test/Ganeti/Locking/Allocation.hs | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/test/hs/Test/Ganeti/Locking/Allocation.hs > b/test/hs/Test/Ganeti/Locking/Allocation.hs > index a2724c9..efab51e 100644 > --- a/test/hs/Test/Ganeti/Locking/Allocation.hs > +++ b/test/hs/Test/Ganeti/Locking/Allocation.hs > @@ -315,6 +315,12 @@ prop_ReadShow = > forAll (arbitrary :: Gen (LockAllocation TestLock TestOwner)) $ \state > -> > J.readJSON (J.showJSON state) ==? J.Ok state > > +-- | Verify that the list of lock owners is complete. > +prop_OwnerComplete :: Property > +prop_OwnerComplete = > + forAll (arbitrary :: Gen (LockAllocation TestLock TestOwner)) $ \state > -> > + foldl freeLocks state (lockOwners state) ==? emptyAllocation > + > testSuite "Locking/Allocation" > [ 'prop_LocksDisjoint > , 'prop_LockImplicationX > @@ -327,4 +333,5 @@ testSuite "Locking/Allocation" > , 'prop_OpportunisticMonotone > , 'prop_OpportunisticAnswer > , 'prop_ReadShow > + , 'prop_OwnerComplete > ] > -- > 1.9.0.279.gdc9e3eb > >
