From c80269089cefd64b7933533b08c9dcde14f2e1cb Mon Sep 17 00:00:00 2001 From: ryan4729 <40183301+ryan4729@users.noreply.github.com> Date: Tue, 9 Oct 2018 17:29:29 -0700 Subject: [PATCH] fix tests broken by previous commit (#69) --- core/tests/LowLevelTests.hs | 9 ++++++--- core/tests/LowLevelTests/Op.hs | 2 +- tests/TestClient.hs | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/tests/LowLevelTests.hs b/core/tests/LowLevelTests.hs index 9baa7f8..efd774e 100644 --- a/core/tests/LowLevelTests.hs +++ b/core/tests/LowLevelTests.hs @@ -674,7 +674,7 @@ testCustomUserAgent = where clientArgs = [UserAgentPrefix "prefix!", UserAgentSuffix "suffix!"] client = - TestClient (ClientConfig "localhost" 50051 clientArgs Nothing) $ + TestClient (ClientConfig "localhost" 50051 clientArgs Nothing Nothing) $ \c -> do rm <- clientRegisterMethodNormal c "/foo" void $ clientRequest c rm 4 "" mempty server = TestServer (serverConf (["/foo"],[],[],[])) $ \s -> do @@ -698,6 +698,7 @@ testClientCompression = "localhost" 50051 [CompressionAlgArg GrpcCompressDeflate] + Nothing Nothing) $ \c -> do rm <- clientRegisterMethodNormal c "/foo" void $ clientRequest c rm 1 "hello" mempty @@ -716,6 +717,7 @@ testClientServerCompression = 50051 [CompressionAlgArg GrpcCompressDeflate] Nothing + Nothing client = TestClient cconf $ \c -> do rm <- clientRegisterMethodNormal c "/foo" clientRequest c rm 1 "hello" mempty >>= do @@ -746,6 +748,7 @@ testClientServerCompressionLvl = 50051 [CompressionLevelArg GrpcCompressLevelHigh] Nothing + Nothing client = TestClient cconf $ \c -> do rm <- clientRegisterMethodNormal c "/foo" clientRequest c rm 1 "hello" mempty >>= do @@ -787,7 +790,7 @@ testClientMaxReceiveMessageLengthChannelArg = do rm <- clientRegisterMethodNormal c "/foo" clientRequest c rm 1 pay mempty >>= k where - conf = ClientConfig "localhost" 50051 [MaxReceiveMessageLength n] Nothing + conf = ClientConfig "localhost" 50051 [MaxReceiveMessageLength n] Nothing Nothing -- Expect success when the max recv payload size is set to 4 bytes, and we -- are sent 4. @@ -885,7 +888,7 @@ stdTestClient :: (Client -> IO ()) -> TestClient stdTestClient = TestClient stdClientConf stdClientConf :: ClientConfig -stdClientConf = ClientConfig "localhost" 50051 [] Nothing +stdClientConf = ClientConfig "localhost" 50051 [] Nothing Nothing data TestServer = TestServer ServerConfig (Server -> IO ()) diff --git a/core/tests/LowLevelTests/Op.hs b/core/tests/LowLevelTests/Op.hs index e8fe67a..52b6d55 100644 --- a/core/tests/LowLevelTests/Op.hs +++ b/core/tests/LowLevelTests/Op.hs @@ -62,7 +62,7 @@ serverConf :: ServerConfig serverConf = ServerConfig "localhost" 50051 [("/foo")] [] [] [] [] Nothing clientConf :: ClientConfig -clientConf = ClientConfig "localhost" 50051 [] Nothing +clientConf = ClientConfig "localhost" 50051 [] Nothing Nothing clientEmptySendOps :: [Op] clientEmptySendOps = [OpSendInitialMetadata mempty, diff --git a/tests/TestClient.hs b/tests/TestClient.hs index 4c4f094..0d3344e 100644 --- a/tests/TestClient.hs +++ b/tests/TestClient.hs @@ -124,7 +124,7 @@ main :: IO () main = do threadDelay 10000000 withGRPC $ \grpc -> - withClient grpc (ClientConfig "localhost" 50051 [] Nothing) $ \client -> + withClient grpc (ClientConfig "localhost" 50051 [] Nothing Nothing) $ \client -> do service <- simpleServiceClient client (defaultMain $ testGroup "Send gRPC requests"