fix tests broken by previous commit (#69)

This commit is contained in:
ryan4729 2018-10-09 17:29:29 -07:00 committed by Parnell Springmeyer
parent 24bdacca3a
commit c80269089c
3 changed files with 8 additions and 5 deletions

View file

@ -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 ())

View file

@ -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,

View file

@ -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"