X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_p2p_Khashmir%2FDHT.py;h=dbaf6836ec327c249fb2301c822efa7268f1ea90;hp=1236ebcf2940a67a3dfbe7367a1616d2e19d332b;hb=c14ca771c67c88699e7b4eb065d834976e4711ba;hpb=6d242a16df6b2f911b8fc7079219b38b26f23ecb diff --git a/apt_p2p_Khashmir/DHT.py b/apt_p2p_Khashmir/DHT.py index 1236ebc..dbaf683 100644 --- a/apt_p2p_Khashmir/DHT.py +++ b/apt_p2p_Khashmir/DHT.py @@ -332,7 +332,7 @@ class TestSimpleDHT(unittest.TestCase): """Simple 2-node unit tests for the DHT.""" timeout = 50 - DHT_DEFAULTS = {'PORT': 9977, + DHT_DEFAULTS = {'VERSION': 'A000', 'PORT': 9977, 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 8, 'STORE_REDUNDANCY': 6, 'RETRIEVE_VALUES': -10000, 'MAX_FAILURES': 3, 'LOCAL_OK': True, @@ -453,7 +453,7 @@ class TestMultiDHT(unittest.TestCase): timeout = 200 num = 20 - DHT_DEFAULTS = {'PORT': 9977, + DHT_DEFAULTS = {'VERSION': 'A000', 'PORT': 9977, 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 8, 'STORE_REDUNDANCY': 6, 'RETRIEVE_VALUES': -10000, 'MAX_FAILURES': 3, 'LOCAL_OK': True, @@ -477,7 +477,7 @@ class TestMultiDHT(unittest.TestCase): if next_node + 1 < len(self.l): d.addCallback(self.node_join, next_node + 1) else: - d.addCallback(self.lastDefer.callback) + reactor.callLater(1, d.addCallback, self.lastDefer.callback) def test_join(self): self.timeout = 2