From 7b0b4f657d1f35d62b125184da146df55a4af130 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 28 Feb 2014 23:08:30 +0400 Subject: Spec: Limit number of nodes in simulation --- tests/Network/BitTorrent/DHT/RoutingSpec.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/Network/BitTorrent/DHT/RoutingSpec.hs') 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 timestamp = gets currentTime instance Arbitrary ip => Arbitrary (Env ip) where - arbitrary = Env <$> arbitrary <*> arbitrary + arbitrary = Env <$> arbitrary <*> (L.take nodeLimit <$> arbitrary) + where + nodeLimit = 1000 instance (Arbitrary ip, Eq ip) => Arbitrary (Table ip) where arbitrary = do -- cgit v1.2.3