diff --git a/src/Transient/Move/Services.hs b/src/Transient/Move/Services.hs index 378b97a..58faa0b 100644 --- a/src/Transient/Move/Services.hs +++ b/src/Transient/Move/Services.hs @@ -55,7 +55,6 @@ requestInstance :: String -> Service -> Int -> Cloud [Node] requestInstance ident service num= loggedc $ do -- return () !> "requestInstance" local $ onException $ \(e:: ConnectionError) -> startMonitor >> continue -- !> ("EXCEPTIOOOOOOOOOOON",e) - nodes <- callService' ident monitorNode (ident,service,num) local $ addNodes nodes -- !> ("ADDNODES",service) return nodes diff --git a/tests/TestSuite.hs b/tests/TestSuite.hs index d52750a..cabd6e5 100644 --- a/tests/TestSuite.hs +++ b/tests/TestSuite.hs @@ -32,19 +32,21 @@ service= [("service","test suite") main= do mr <- keep $ test `catcht` \(e:: SomeException) -> liftIO (putStr "EXCEPTiON: " >> print e) >> exit (Just e) + endMonitor + case mr of Nothing -> print "NO RESULT, NO THREADS RUNNING" >> exitFailure Just Nothing -> print "SUCCESS" >> exitSuccess Just (Just e) -> putStr "FAIL: " >> print e >> exitFailure + test= initNodeServ service "localhost" 8080 $ do node0 <- local getMyNode local $ guard (nodePort node0== 8080) -- only executes in node 8080 - -- local $ option "get" "get instances" @@ -90,7 +92,6 @@ test= initNodeServ service "localhost" 8080 $ do localIO $ print r assert (sort (M.toList r) == sort [("hello",2::Int),("world",1)]) $ return r - localIO endMonitor local $ exit (Nothing :: Maybe SomeException) -- remove this to repeat the test