Skip to content

Commit 97a8058

Browse files
fix(qa): Improve connection times in regtest framework (ZcashFoundation#9917)
* reduce default `crawl_new_peer_interval` * remove reindex test --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 7ee77de commit 97a8058

File tree

4 files changed

+3
-76
lines changed

4 files changed

+3
-76
lines changed

zebra-rpc/qa/base_config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ listen_addr = "127.0.0.1:0"
66
network = "Regtest"
77
max_connections_per_ip = 10
88
cache_dir = false
9+
crawl_new_peer_interval = "5 seconds"
10+
initial_mainnet_peers = []
11+
initial_testnet_peers = []
912

1013
[rpc]
1114
listen_addr = "127.0.0.1:0"

zebra-rpc/qa/pull-tester/rpc-tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
BASE_SCRIPTS= [
3939
# Scripts that are run by the travis build process
4040
# Longest test should go first, to favor running tests in parallel
41-
'reindex.py',
4241
'getmininginfo.py',
4342
'nuparams.py',
4443
'addnode.py',

zebra-rpc/qa/rpc-tests/addnode.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,11 @@ def setup_network(self, split=False):
2424
connect_nodes_bi(self.nodes,1,2)
2525
connect_nodes_bi(self.nodes,0,2)
2626
self.is_network_split=split
27-
self.sync_all(False)
2827

2928
self.nodes[0].generate(1)
3029
self.sync_all(False)
3130

3231
def run_test(self):
33-
print("checking connections...")
34-
35-
# As we connected the nodes to each other, they should have,
36-
# at least 4 peers. Poll for that.
37-
# TODO: Move this check to its own function.
38-
timeout_for_connetions = 180
39-
wait_time = 1
40-
while timeout_for_connetions > 0:
41-
if (len(self.nodes[0].getpeerinfo()) < 4 or
42-
len(self.nodes[1].getpeerinfo()) < 4 or
43-
len(self.nodes[2].getpeerinfo()) < 4):
44-
timeout_for_connetions -= wait_time
45-
time.sleep(wait_time)
46-
else:
47-
break
48-
assert timeout_for_connetions > 0, "Timeout waiting for connections"
49-
5032
print("Mining blocks...")
5133

5234
# Mine a block from node0

zebra-rpc/qa/rpc-tests/reindex.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)