mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-12-24 18:59:44 +01:00
fix tests broken by previous commit (#69)
This commit is contained in:
parent
24bdacca3a
commit
c80269089c
3 changed files with 8 additions and 5 deletions
|
@ -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 ())
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue