Skip to content

Commit be7c66d

Browse files
committed
test: Optimize for speed
1 parent 224a98a commit be7c66d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/p2p_quorum_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_score():
6363
if peer["id"] == peer_id:
6464
return peer["banscore"]
6565
return None
66-
wait_until(lambda: get_score() == expected_score, timeout=6, sleep=2)
66+
wait_until(lambda: get_score() == expected_score, timeout=6)
6767

6868

6969
def p2p_connection(node, uacomment=None):
@@ -73,7 +73,7 @@ def p2p_connection(node, uacomment=None):
7373
def get_mininode_id(node, uacomment=None):
7474
tries = 0
7575
node_id = None
76-
while tries < 10 and node_id is None:
76+
while tries < 200 and node_id is None:
7777
for p in node.getpeerinfo():
7878
for p2p in node.p2ps:
7979
if uacomment is not None and p2p.uacomment != uacomment:
@@ -82,7 +82,7 @@ def get_mininode_id(node, uacomment=None):
8282
node_id = p["id"]
8383
break
8484
tries += 1
85-
time.sleep(1)
85+
time.sleep(0.05)
8686
assert node_id is not None
8787
return node_id
8888

0 commit comments

Comments
 (0)