summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/DHT
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-21 02:50:57 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-21 02:50:57 +0400
commit3c66c7129a9194d3c8bb3b65595d760d431ee5a2 (patch)
treefc0ef4c24670f597c2fbfaae98170999369a5f92 /tests/Network/BitTorrent/DHT
parent76ef96ac3d5ad8d8ac3921fb0683a8e192e54090 (diff)
Disable logging in DHT spec
Diffstat (limited to 'tests/Network/BitTorrent/DHT')
-rw-r--r--tests/Network/BitTorrent/DHT/SessionSpec.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs
index b3b9a9fc..bb32cf0e 100644
--- a/tests/Network/BitTorrent/DHT/SessionSpec.hs
+++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs
@@ -2,6 +2,7 @@
2module Network.BitTorrent.DHT.SessionSpec (spec) where 2module Network.BitTorrent.DHT.SessionSpec (spec) where
3import Control.Applicative 3import Control.Applicative
4import Control.Concurrent 4import Control.Concurrent
5import Control.Exception
5import Control.Monad.Reader 6import Control.Monad.Reader
6import Control.Monad.Trans.Resource 7import Control.Monad.Trans.Resource
7import Data.Default 8import Data.Default
@@ -23,7 +24,9 @@ myAddr :: NodeAddr IPv4
23myAddr = "127.0.0.1:60000" 24myAddr = "127.0.0.1:60000"
24 25
25simpleDHT :: DHT IPv4 a -> IO a 26simpleDHT :: DHT IPv4 a -> IO a
26simpleDHT = dht def myAddr 27simpleDHT m =
28 bracket (newNode defaultHandlers def myAddr nullLogger) closeNode $ \ node ->
29 runDHT node m
27 30
28isRight :: Either a b -> Bool 31isRight :: Either a b -> Bool
29isRight (Left _) = False 32isRight (Left _) = False