diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-21 02:50:57 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-21 02:50:57 +0400 |
commit | 3c66c7129a9194d3c8bb3b65595d760d431ee5a2 (patch) | |
tree | fc0ef4c24670f597c2fbfaae98170999369a5f92 /tests/Network/BitTorrent/DHT | |
parent | 76ef96ac3d5ad8d8ac3921fb0683a8e192e54090 (diff) |
Disable logging in DHT spec
Diffstat (limited to 'tests/Network/BitTorrent/DHT')
-rw-r--r-- | tests/Network/BitTorrent/DHT/SessionSpec.hs | 5 |
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 @@ | |||
2 | module Network.BitTorrent.DHT.SessionSpec (spec) where | 2 | module Network.BitTorrent.DHT.SessionSpec (spec) where |
3 | import Control.Applicative | 3 | import Control.Applicative |
4 | import Control.Concurrent | 4 | import Control.Concurrent |
5 | import Control.Exception | ||
5 | import Control.Monad.Reader | 6 | import Control.Monad.Reader |
6 | import Control.Monad.Trans.Resource | 7 | import Control.Monad.Trans.Resource |
7 | import Data.Default | 8 | import Data.Default |
@@ -23,7 +24,9 @@ myAddr :: NodeAddr IPv4 | |||
23 | myAddr = "127.0.0.1:60000" | 24 | myAddr = "127.0.0.1:60000" |
24 | 25 | ||
25 | simpleDHT :: DHT IPv4 a -> IO a | 26 | simpleDHT :: DHT IPv4 a -> IO a |
26 | simpleDHT = dht def myAddr | 27 | simpleDHT m = |
28 | bracket (newNode defaultHandlers def myAddr nullLogger) closeNode $ \ node -> | ||
29 | runDHT node m | ||
27 | 30 | ||
28 | isRight :: Either a b -> Bool | 31 | isRight :: Either a b -> Bool |
29 | isRight (Left _) = False | 32 | isRight (Left _) = False |