Skip to content
Snippets Groups Projects
Commit c48e2da6 authored by Jens Nolte's avatar Jens Nolte
Browse files

Add test to check if resource manager starts disposing on exception

parent 0a410fb3
No related branches found
No related tags found
No related merge requests found
......@@ -100,3 +100,11 @@ spec = parallel $ do
registerDisposeAction $ pure () <$ (atomically (writeTVar var2 True))
atomically (readTVar var1) `shouldReturn` True
atomically (readTVar var2) `shouldReturn` True
it "withRootResourceManager will start disposing when receiving an exception" $ io do
(`shouldThrow` \(_ :: CombinedException) -> True) do
withRootResourceManager do
linkExecution do
rm <- askResourceManager
liftIO $ throwToResourceManager rm TestException
sleepForever
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment