diff options
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | 8 |
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 #-} |
2 | module Network.BitTorrent.Tracker.RPC.UDPSpec (spec, trackerURIs) where | 2 | module Network.BitTorrent.Tracker.RPC.UDPSpec (spec, trackerURIs) where |
3 | 3 | import Control.Concurrent.Async | |
4 | import Control.Monad | 4 | import Control.Monad |
5 | import Data.Default | 5 | import Data.Default |
6 | import Data.List as L | 6 | import 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 | ||