Skip to content

Commit

Permalink
Fix pytest (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenwang1996 committed Jan 20, 2020
1 parent 8d2f2bd commit 90db648
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pytest/lib/cluster.py
Expand Up @@ -316,6 +316,7 @@ def spin_up_node(config, near_root, node_dir, ordinal, boot_key, boot_addr, blac
print(f"node {ordinal} machine created")

node.start(boot_key, boot_addr)
time.sleep(3)
print(f"node {ordinal} started")
return node

Expand All @@ -336,8 +337,8 @@ def init_cluster(num_nodes, num_observers, num_shards, config, genesis_config_ch
assert 0 == process.returncode, err

node_dirs = [line.split()[-1]
for line in err.decode('utf8').split('\n') if '/test' in line]
assert len(node_dirs) == num_nodes + num_observers
for line in out.decode('utf8').split('\n') if '/test' in line]
assert len(node_dirs) == num_nodes + num_observers, "node dirs: %s num_nodes: %s num_observers: %s" % (len(node_dirs), num_nodes, num_observers)

# apply config changes
for i, node_dir in enumerate(node_dirs):
Expand Down Expand Up @@ -422,7 +423,7 @@ def load_config():
try:
with open(config_file) as f:
config = json.load(f)
print(f"Load config from {config_file}, config {config}")
print(f"Load config from {config_file}, config {config}")
except:
print(f"Failed to load config file, use default config {config}")
else:
Expand Down

0 comments on commit 90db648

Please sign in to comment.