From: Cameron Date: Mon, 24 Dec 2007 22:42:08 +0000 (-0800) Subject: Add timeouts to some unittests. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9dc951ead43b5651a99fbb31690fccf49530c04c;p=quix0rs-apt-p2p.git Add timeouts to some unittests. --- diff --git a/apt_dht/MirrorManager.py b/apt_dht/MirrorManager.py index dd8030a..4f1c32f 100644 --- a/apt_dht/MirrorManager.py +++ b/apt_dht/MirrorManager.py @@ -77,6 +77,7 @@ class MirrorManager: class TestMirrorManager(unittest.TestCase): """Unit tests for the mirror manager.""" + timeout = 20 pending_calls = [] client = None diff --git a/apt_dht_Khashmir/khashmir.py b/apt_dht_Khashmir/khashmir.py index bc6f835..dd2bf30 100644 --- a/apt_dht_Khashmir/khashmir.py +++ b/apt_dht_Khashmir/khashmir.py @@ -357,6 +357,8 @@ class Khashmir(KhashmirWrite): _Node = KNodeWrite class SimpleTests(unittest.TestCase): + + timeout = 10 DHT_DEFAULTS = {'PORT': 9977, 'K': 8, 'HASH_LENGTH': 160, 'CHECKPOINT_INTERVAL': 900, 'CONCURRENT_REQS': 4, 'STORE_REDUNDANCY': 3, 'MAX_FAILURES': 3, @@ -446,6 +448,8 @@ class SimpleTests(unittest.TestCase): class MultiTest(unittest.TestCase): + + timeout = 30 num = 20 DHT_DEFAULTS = {'PORT': 9977, 'K': 8, 'HASH_LENGTH': 160, 'CHECKPOINT_INTERVAL': 900, 'CONCURRENT_REQS': 4,