summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/DHT/SessionSpec.hs2
-rw-r--r--tests/Network/BitTorrent/DHTSpec.hs4
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs
index c936dd1b..41852763 100644
--- a/tests/Network/BitTorrent/DHT/SessionSpec.hs
+++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs
@@ -64,7 +64,7 @@ spec = do
64 property $ \ (nid :: NodeId) -> do 64 property $ \ (nid :: NodeId) -> do
65 let info = NodeInfo nid myAddr 65 let info = NodeInfo nid myAddr
66 closest <- simpleDHT $ do 66 closest <- simpleDHT $ do
67 insertNode info 67 _ <- insertNode info
68 liftIO $ yield 68 liftIO $ yield
69 getClosest nid 69 getClosest nid
70 closest `shouldSatisfy` L.elem info 70 closest `shouldSatisfy` L.elem info
diff --git a/tests/Network/BitTorrent/DHTSpec.hs b/tests/Network/BitTorrent/DHTSpec.hs
index a8248be2..76b48257 100644
--- a/tests/Network/BitTorrent/DHTSpec.hs
+++ b/tests/Network/BitTorrent/DHTSpec.hs
@@ -4,11 +4,9 @@ import Control.Monad
4import Data.Default 4import Data.Default
5import Data.List as L 5import Data.List as L
6import Test.Hspec 6import Test.Hspec
7import Test.QuickCheck
8import System.Timeout 7import System.Timeout
9 8
10import Data.Torrent.InfoHash 9import Data.Torrent.InfoHash
11import Network.BitTorrent.Core
12import Network.BitTorrent.DHT 10import Network.BitTorrent.DHT
13 11
14 12
@@ -38,7 +36,7 @@ spec = do
38 it "partial bootstrapping should finish in less than 10 seconds" $ do 36 it "partial bootstrapping should finish in less than 10 seconds" $ do
39 node <- resolveHostName (L.head defaultBootstrapNodes) 37 node <- resolveHostName (L.head defaultBootstrapNodes)
40 res <- timeout partialBootstrapTimeout $ do 38 res <- timeout partialBootstrapTimeout $ do
41 dht def def $ do 39 dht opts def $ do
42 bootstrap [node] 40 bootstrap [node]
43 isBootstrapped 41 isBootstrapped
44 res `shouldBe` Just True 42 res `shouldBe` Just True