Skip to content

Commit

Permalink
fix: Fix pytest after log to stderr (#2203)
Browse files Browse the repository at this point in the history
Similar to #1985 but now we changed back to log to stderr

Test Plans
-------------
Run pytest locally, now it's no longer have `AssertionError: node dirs: 0 num_nodes: 4 num_observers: 0` error
  • Loading branch information
ailisp authored Feb 27, 2020
1 parent bbf7a25 commit b75367f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ core/wasm/**/Cargo.lock
# Python env
.env
*.pyc
venv

# Node
**/node_modules/
Expand Down
2 changes: 1 addition & 1 deletion pytest/lib/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ 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 out.decode('utf8').split('\n') if '/test' in line]
for line in err.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
Expand Down

0 comments on commit b75367f

Please sign in to comment.