on master help sign in
update existing tests to pass
commitc85fad4cae6b348ac871a5aa623d80c636cf15bc authorAgentM <agentm@themactionfaction.com> dateMon 25 Jan 2016, 18:14 (11 years ago) parent69e3461
4 files changed+6−7
ProjectM36/Client.hs+1−1 test/Server/Main.hs+1−1 test/TutorialD/Interpreter.hs+3−4 test/persistent-driver/test.hs+1−1
ProjectM36/Client.hs+1−1
@@ -42,6 +42,7 @@ module ProjectM36.Client
4242 Session,
4343 SessionId,
4444 NotificationCallback,
45+ emptyNotificationCallback,
4546 AtomType(..)) where
4647import ProjectM36.Base hiding (inclusionDependencies) --defined in this module as well
4748import qualified ProjectM36.Base as B
@@ -78,7 +79,6 @@ import ProjectM36.Sessions
7879import ListT
7980import Data.Binary (Binary)
8081import GHC.Generics (Generic)
81−import System.IO (stderr, hPutStrLn)
8282--import Debug.Trace
8383
8484type Hostname = String
test/Server/Main.hs+1−1
@@ -43,7 +43,7 @@ testDatabaseName = "test"
4343
4444testConnection :: Port -> IO (Either ConnectionError (SessionId, Connection))
4545testConnection port = do
46− let connInfo = RemoteProcessConnectionInfo testDatabaseName (createNodeId "127.0.0.1" port)
46+ let connInfo = RemoteProcessConnectionInfo testDatabaseName (createNodeId "127.0.0.1" port) emptyNotificationCallback
4747 eConn <- connectProjectM36 connInfo
4848 case eConn of
4949 Left err -> pure $ Left err
test/TutorialD/Interpreter.hs+3−4
@@ -224,12 +224,11 @@ simpleJoinTest = TestCase $ assertTutdEqual dateExamples joinedRel "x:=S join SP
224224 [stringAtom "London", intAtom 200, stringAtom "P2", stringAtom "S4", stringAtom "Clark", intAtom 20]
225225 ]
226226transactionGraph :: Connection -> IO TransactionGraph
227−transactionGraph (InProcessConnection _ _ tvar) = atomically $ readTVar tvar
228−
227+transactionGraph (InProcessConnection _ _ _ tvar) = atomically $ readTVar tvar
229228transactionGraph _ = error "remote connection used"
230229
231230disconnectedTransaction :: SessionId -> Connection -> IO DisconnectedTransaction
232−disconnectedTransaction sessionId (InProcessConnection _ sessions _) = do
231+disconnectedTransaction sessionId (InProcessConnection _ _ sessions _) = do
233232 mSession <- atomically $ do
234233 STMMap.lookup sessionId sessions
235234 case mSession of
@@ -245,7 +244,7 @@ inclusionDependencies _ = error "remote connection used"
245244
246245dateExamplesConnection :: IO (SessionId, Connection)
247246dateExamplesConnection = do
248− dbconn <- connectProjectM36 (InProcessConnectionInfo NoPersistence)
247+ dbconn <- connectProjectM36 (InProcessConnectionInfo NoPersistence emptyNotificationCallback)
249248 let incDeps = Base.inclusionDependencies dateExamples
250249 case dbconn of
251250 Left err -> error (show err)
test/persistent-driver/test.hs+1−1
@@ -39,7 +39,7 @@ main = do
3939 if errors tcounts + failures tcounts > 0 then exitFailure else exitSuccess
4040
4141inProcSettings :: ConnectionInfo
42−inProcSettings = InProcessConnectionInfo NoPersistence
42+inProcSettings = InProcessConnectionInfo NoPersistence emptyNotificationCallback
4343
4444defPersonRel :: SessionId -> Connection -> IO ()
4545defPersonRel sessionId conn = do