Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Nov 29, 2024
1 parent 0c0c55c commit 413c854
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 4 additions & 4 deletions integration_tests/test_rollback.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def update_node_cmd(path, cmd, i):
def post_init(broken_binary):
def inner(path, base_port, config):
chain_id = "cronos_777-1"
update_node_cmd(path / chain_id, broken_binary, 2)
update_node_cmd(path / chain_id, broken_binary, 3)
update_node_cmd(path / chain_id, broken_binary, 4)

return inner

Expand Down Expand Up @@ -67,10 +67,10 @@ def test_rollback(custom_cronos):
- use rollback command to rollback the db.
- switch to correct binary should make the node syncing again.
node2: test memiavl node
node3: test iavl node
node3: test memiavl node
node4: test iavl node
"""
nodes = [2, 3]
nodes = [3, 4]
clis = {i: custom_cronos.cosmos_cli(i) for i in nodes}
for i, cli in clis.items():
wait_for_port(ports.rpc_port(custom_cronos.base_port(i)))
Expand Down
8 changes: 6 additions & 2 deletions integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def exec(c, tmp_path_factory):
json.dump(json.loads(cli.export()), fp)
fp.flush()

c.supervisorctl("start", "cronos_777-1-node0", "cronos_777-1-node1")
c.supervisorctl(
"start", "cronos_777-1-node0", "cronos_777-1-node1", "cronos_777-1-node2"
)
wait_for_port(ports.evmrpc_port(base_port))
wait_for_new_blocks(cli, 1)

Expand Down Expand Up @@ -278,7 +280,9 @@ def do_upgrade(plan_name, target, mode=None):
genesis["genesis_time"] = config.get("genesis-time")
file = c.cosmos_cli(i).data_dir / "config/genesis.json"
file.write_text(json.dumps(genesis))
c.supervisorctl("start", "cronos_777-1-node0", "cronos_777-1-node1")
c.supervisorctl(
"start", "cronos_777-1-node0", "cronos_777-1-node1", "cronos_777-1-node2"
)
wait_for_new_blocks(c.cosmos_cli(), 1)

height = cli.block_height()
Expand Down
10 changes: 7 additions & 3 deletions integration_tests/test_versiondb.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ def test_versiondb_migration(cronos: Cronos):
patch_app_db_backend(cli1.data_dir / "config/app.toml", "rocksdb")

print("start all nodes")
print(cronos.supervisorctl("start", "cronos_777-1-node0", "cronos_777-1-node1"))
wait_for_port(ports.evmrpc_port(cronos.base_port(0)))
wait_for_port(ports.evmrpc_port(cronos.base_port(1)))
print(
cronos.supervisorctl(

Check failure on line 76 in integration_tests/test_versiondb.py

View workflow job for this annotation

GitHub Actions / integration_tests (unmarked)

test_versiondb_migration[True] subprocess.CalledProcessError: Command '('/nix/store/n2mb16yxhi2bx73dkqwj5gpq6bp7b8mk-python3-3.11.9-env/bin/python3.11', '-msupervisor.supervisorctl', '-c', PosixPath('/tmp/pytest-of-runner/pytest-0/indexer0/cronos_777-1/../tasks.ini'), 'start', 'cronos_777-1-node0', 'cronos_777-1-node1', 'cronos_777-1-node2')' returned non-zero exit status 7.
"start", "cronos_777-1-node0", "cronos_777-1-node1", "cronos_777-1-node2"
)
)
for i in range(len(cronos.config["validators"])):
wait_for_port(ports.evmrpc_port(cronos.base_port(i)))

assert w3.eth.get_balance(community, block_identifier=block0) == balance0
assert w3.eth.get_balance(community, block_identifier=block1) == balance1
Expand Down

0 comments on commit 413c854

Please sign in to comment.