Verified Commit c7e17f21 authored by Camil Staps's avatar Camil Staps 🚀

Fix tests now that task values are cleaned up

parent 683dadcc
......@@ -94,7 +94,10 @@ where
//Empty the store to make sure that we get a reliable task instance no 1
# iworld = emptyStore iworld
//Create an instance with autolayouting disabled at the top level
# (res,iworld) = createSessionTaskInstance (task >>- \r -> shutDown 0 @! r) 'Map'.newMap iworld
# resultShare = sharedStore "iTasks.Testing.Unit:resultShare" ?None
# (res,iworld) = createSessionTaskInstance
(task >>- \r -> set (?Just r) resultShare >-| shutDown 0)
'Map'.newMap iworld
= case res of
(Ok (instanceNo,instanceKey))
//Apply all events
......@@ -104,7 +107,7 @@ where
//Collect output
# iworld = loop (determineTimeout ?None) iworld
# (mbOutput,iworld) = 'SDS'.read (sdsFocus instanceNo taskInstanceOutput) 'SDS'.EmptyContext iworld
# (mbValue,iworld) = 'SDS'.read (sdsFocus instanceNo taskInstanceValue) 'SDS'.EmptyContext iworld
# (mbValue,iworld) = 'SDS'.read resultShare 'SDS'.EmptyContext iworld
# world = destroyIWorld iworld
# verdict = check` mbOutput mbValue
= (verdict,world)
......@@ -142,10 +145,9 @@ where
}
check` (Ok ('SDS'.ReadingDone queue)) (Ok ('SDS'.ReadingDone val))
# val = decodeTaskValue val
= case val of
Value val True -> check (toList queue) val
_ -> Failed (?Just (CustomFailReason "no stable task value"))
?Just val -> check (toList queue) val
_ -> Failed (?Just (CustomFailReason "no stable task value"))
where
//SHOULD BE IN Data.Queue
toList (Queue front rear) = front ++ reverse rear
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment