diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-28 23:08:30 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-28 23:08:30 +0400 |
commit | 7b0b4f657d1f35d62b125184da146df55a4af130 (patch) | |
tree | 706622e3dac9c9b5e367b411f0ab021889700e82 /tests/Network/BitTorrent | |
parent | d2a7cf38faace09b221ff7d085af11ea49c32500 (diff) |
Spec: Limit number of nodes in simulation
Diffstat (limited to 'tests/Network/BitTorrent')
-rw-r--r-- | tests/Network/BitTorrent/DHT/RoutingSpec.hs | 4 |
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 | ||
33 | instance Arbitrary ip => Arbitrary (Env ip) where | 33 | instance 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 | ||
36 | instance (Arbitrary ip, Eq ip) => Arbitrary (Table ip) where | 38 | instance (Arbitrary ip, Eq ip) => Arbitrary (Table ip) where |
37 | arbitrary = do | 39 | arbitrary = do |