From 76ef96ac3d5ad8d8ac3921fb0683a8e192e54090 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 21 Feb 2014 02:48:58 +0400 Subject: Rename startNode to newNode --- tests/Network/BitTorrent/DHT/QuerySpec.hs | 2 +- tests/Network/BitTorrent/DHT/SessionSpec.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/Network/BitTorrent') diff --git a/tests/Network/BitTorrent/DHT/QuerySpec.hs b/tests/Network/BitTorrent/DHT/QuerySpec.hs index b89ce4ff..33114b40 100644 --- a/tests/Network/BitTorrent/DHT/QuerySpec.hs +++ b/tests/Network/BitTorrent/DHT/QuerySpec.hs @@ -28,7 +28,7 @@ nullLogger _ _ _ _ = return () simpleDHT :: [NodeHandler IPv4] -> DHT IPv4 a -> IO a simpleDHT hs m = - bracket (startNode hs def myAddr nullLogger) stopNode $ \ node -> + bracket (newNode hs def myAddr nullLogger) closeNode $ \ node -> runDHT node m getBootInfo :: IO (NodeInfo IPv4) diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs index 41852763..b3b9a9fc 100644 --- a/tests/Network/BitTorrent/DHT/SessionSpec.hs +++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs @@ -39,10 +39,10 @@ spec :: Spec spec = do describe "session" $ do it "is active until stopNode called" $ do - node <- startNode [] def myAddr nullLogger + node <- newNode [] def myAddr nullLogger runDHT node monadActive `shouldReturn` True runDHT node monadActive `shouldReturn` True - stopNode node + closeNode node runDHT node monadActive `shouldReturn` False describe "tokens" $ do -- cgit v1.2.3