From 9dc951ead43b5651a99fbb31690fccf49530c04c Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 24 Dec 2007 14:42:08 -0800 Subject: [PATCH] Add timeouts to some unittests. --- apt_dht/MirrorManager.py | 1 + apt_dht_Khashmir/khashmir.py | 4 ++++ 2 files changed, 5 insertions(+) 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, -- 2.39.5