summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-28 23:08:30 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-28 23:08:30 +0400
commit7b0b4f657d1f35d62b125184da146df55a4af130 (patch)
tree706622e3dac9c9b5e367b411f0ab021889700e82 /tests/Network
parentd2a7cf38faace09b221ff7d085af11ea49c32500 (diff)
Spec: Limit number of nodes in simulation
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/DHT/RoutingSpec.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Network/BitTorrent/DHT/RoutingSpec.hs b/tests/Network/BitTorrent/DHT/RoutingSpec.hs
index a92fec38..651412cf 100644
--- a/tests/Network/BitTorrent/DHT/RoutingSpec.hs
+++ b/tests/Network/BitTorrent/DHT/RoutingSpec.hs
@@ -31,7 +31,9 @@ runSimulation e m = evalState (runRouting ping closest timestamp m) e
31 timestamp = gets currentTime 31 timestamp = gets currentTime
32 32
33instance Arbitrary ip => Arbitrary (Env ip) where 33instance Arbitrary ip => Arbitrary (Env ip) where
34 arbitrary = Env <$> arbitrary <*> arbitrary 34 arbitrary = Env <$> arbitrary <*> (L.take nodeLimit <$> arbitrary)
35 where
36 nodeLimit = 1000
35 37
36instance (Arbitrary ip, Eq ip) => Arbitrary (Table ip) where 38instance (Arbitrary ip, Eq ip) => Arbitrary (Table ip) where
37 arbitrary = do 39 arbitrary = do