chore: fix tests

This commit is contained in:
Gregor Kleen 2020-03-16 08:52:25 +01:00
parent 773c6c5dc0
commit 0a2a578547
2 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ import qualified Data.Set as Set
import Handler.Utils.Routes (classifyHandler) import Handler.Utils.Routes (classifyHandler)
import qualified Data.Acid as Acid import qualified Data.Acid.Memory as Acid
import qualified Web.ServerSession.Backend.Acid as Acid import qualified Web.ServerSession.Backend.Acid as Acid
-- Import all relevant handler modules here. -- Import all relevant handler modules here.
@ -250,7 +250,7 @@ mkSessionStore AppSettings{..} mcdSqlConnPool
let mcdSqlMemcachedExpiration = memcachedExpiry let mcdSqlMemcachedExpiration = memcachedExpiry
return $ _SessionStorageMemcachedSql # MemcachedSqlStorage{..} return $ _SessionStorageMemcachedSql # MemcachedSqlStorage{..}
| appServerSessionAcidFallback = liftIO $ | appServerSessionAcidFallback = liftIO $
review _SessionStorageAcid . Acid.AcidStorage <$> Acid.openLocalStateFrom "sessions" Acid.emptyState review _SessionStorageAcid . Acid.AcidStorage <$> Acid.openMemoryState Acid.emptyState
| otherwise = throwM SessionStoreNotAvailable | otherwise = throwM SessionStoreNotAvailable

View File

@ -122,8 +122,8 @@ allocationAcceptForm aId = runMaybeT $ do
optimumProportion optimumProportion
| allocationCapacity == 0 = 0 | allocationCapacity == 0 = 0
| otherwise = fromIntegral allocationPlacesRequested % fromIntegral allocationCapacity | otherwise = fromIntegral allocationPlacesRequested % fromIntegral allocationCapacity
allocHeat capN allocated allocHeat capN
= invDualHeat (optimumAllocated capN) capN allocated = invDualHeat (optimumAllocated capN) capN
degenerateHeat capN degenerateHeat capN
= capN <= optimumAllocated capN = capN <= optimumAllocated capN