summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Tracker/RPC
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-17 01:57:37 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-17 01:57:37 +0400
commitecbb684994263be9a2b3bdfe6899e847bce7d3fc (patch)
tree0987efb61668c366248a67310bad4fd70bbf6e5c /tests/Network/BitTorrent/Tracker/RPC
parente9ea74560023caf15a702a303bbd06237c879cb0 (diff)
UDP tracker RPC: test concurrent queries
Diffstat (limited to 'tests/Network/BitTorrent/Tracker/RPC')
-rw-r--r--tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs
index fd7d1232..3ecc139d 100644
--- a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs
+++ b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs
@@ -1,6 +1,6 @@
1{-# LANGUAGE RecordWildCards #-} 1{-# LANGUAGE RecordWildCards #-}
2module Network.BitTorrent.Tracker.RPC.UDPSpec (spec, trackerURIs) where 2module Network.BitTorrent.Tracker.RPC.UDPSpec (spec, trackerURIs) where
3 3import Control.Concurrent.Async
4import Control.Monad 4import Control.Monad
5import Data.Default 5import Data.Default
6import Data.List as L 6import Data.List as L
@@ -47,3 +47,9 @@ spec = parallel $ do
47 withManager def $ \ mgr -> do 47 withManager def $ \ mgr -> do
48 xs <- scrape mgr uri [def] 48 xs <- scrape mgr uri [def]
49 L.length xs `shouldSatisfy` (>= 1) 49 L.length xs `shouldSatisfy` (>= 1)
50
51 describe "Manager" $ do
52 it "should handle arbitrary intermixed concurrent queries" $ do
53 withManager def $ \ mgr -> do
54 _ <- mapConcurrently (\ _ -> scrape mgr uri [def]) [1..100]
55 return () \ No newline at end of file