summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-01-08 06:56:28 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-01-08 06:56:28 +0400
commit1fb619d9d5edc1c352e2b72cbf5dfcf5c64d05ff (patch)
tree37ccd6b5a301eda46086e1ac9166aa7596f4c731 /tests/Network
parente26ef0001157a1ff6b3a1ec809e5c53c37472161 (diff)
Allow to ask for query count
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/KRPCSpec.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Network/KRPCSpec.hs b/tests/Network/KRPCSpec.hs
index 756c6855..e695a646 100644
--- a/tests/Network/KRPCSpec.hs
+++ b/tests/Network/KRPCSpec.hs
@@ -33,6 +33,15 @@ spec = do
33 query servAddr (Echo int)) 33 query servAddr (Echo int))
34 `shouldReturn` Echo int 34 `shouldReturn` Echo int
35 35
36 it "count transactions properly" $ do
37 (withManager opts servAddr handlers $ runReaderT $ do
38 listen
39 _ <- query servAddr (Echo (0xabcd :: Int))
40 _ <- query servAddr (Echo (0xabcd :: Int))
41 getQueryCount
42 )
43 `shouldReturn` 2
44
36 it "throw timeout exception" $ do 45 it "throw timeout exception" $ do
37 (withManager opts servAddr handlers $ runReaderT $ do 46 (withManager opts servAddr handlers $ runReaderT $ do
38 query servAddr (Echo (0xabcd :: Int)) 47 query servAddr (Echo (0xabcd :: Int))