Fix warnings

This commit is contained in:
Joel Stanley 2016-05-25 15:43:03 -07:00
parent 2882a2a8ff
commit df46b33c6a

View file

@ -2,7 +2,6 @@
module LowLevelTests (lowLevelTests) where module LowLevelTests (lowLevelTests) where
import Control.Applicative
import Control.Concurrent.Async import Control.Concurrent.Async
import Control.Monad import Control.Monad
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
@ -49,7 +48,7 @@ payloadLowLevelServer = TestServer $ \grpc -> do
withServer grpc conf $ \server -> do withServer grpc conf $ \server -> do
let method = head (registeredMethods server) let method = head (registeredMethods server)
result <- serverHandleNormalRegisteredCall server method 11 M.empty $ result <- serverHandleNormalRegisteredCall server method 11 M.empty $
\reqBody reqMeta -> \_reqBody _reqMeta ->
return ("reply test", dummyMeta, dummyMeta, return ("reply test", dummyMeta, dummyMeta,
StatusDetails "details string") StatusDetails "details string")
case result of case result of
@ -64,7 +63,7 @@ payloadLowLevelClient = TestClient $ \grpc ->
reqResult <- clientRegisteredRequest client method 10 "Hello!" M.empty reqResult <- clientRegisteredRequest client method 10 "Hello!" M.empty
case reqResult of case reqResult of
Left x -> error $ "Client got error: " ++ show x Left x -> error $ "Client got error: " ++ show x
Right (NormalRequestResult respBody initMeta trailingMeta respCode details) -> do Right (NormalRequestResult respBody _initMeta _trailingMeta respCode details) -> do
details @?= "details string" details @?= "details string"
respBody @?= "reply test" respBody @?= "reply test"
respCode @?= GrpcStatusOk respCode @?= GrpcStatusOk
@ -76,7 +75,7 @@ payloadLowLevelClientUnregistered = TestClient $ \grpc -> do
case reqResult of case reqResult of
Left x -> error $ "Client got error: " ++ show x Left x -> error $ "Client got error: " ++ show x
Right (NormalRequestResult Right (NormalRequestResult
respBody initMeta trailingMeta respCode details) -> do respBody _initMeta _trailingMeta respCode details) -> do
respBody @?= "reply test" respBody @?= "reply test"
respCode @?= GrpcStatusOk respCode @?= GrpcStatusOk
details @?= "details string" details @?= "details string"
@ -85,7 +84,7 @@ payloadLowLevelServerUnregistered :: TestServer
payloadLowLevelServerUnregistered = TestServer $ \grpc -> do payloadLowLevelServerUnregistered = TestServer $ \grpc -> do
withServer grpc (ServerConfig "localhost" 50051 []) $ \server -> do withServer grpc (ServerConfig "localhost" 50051 []) $ \server -> do
result <- serverHandleNormalCall server 11 M.empty $ result <- serverHandleNormalCall server 11 M.empty $
\reqBody reqMeta -> return ("reply test", M.empty, \_reqBody _reqMeta -> return ("reply test", M.empty,
StatusDetails "details string") StatusDetails "details string")
case result of case result of
Left x -> error $ show x Left x -> error $ show x