Skip to content

Commit

Permalink
pytest: Stabilize the hsm_encryption test
Browse files Browse the repository at this point in the history
Tailing the log when we expect the process to exit can be racy (in this case
we were waiting for the last line that'd be printed).
  • Loading branch information
cdecker committed Dec 11, 2019
1 parent 6cc60f5 commit 3def539
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ def test_hsm_secret_encryption(node_factory):
wait_for_initialized=False)
l1.daemon.wait_for_log(r'The hsm_secret is encrypted')
os.write(master_fd, password[2:].encode("utf-8"))
l1.daemon.wait_for_log("Wrong password for encrypted hsm_secret.")
assert(l1.daemon.proc.wait() == 1)
assert(l1.daemon.is_in_log("Wrong password for encrypted hsm_secret."))

# Test we can restore the same wallet with the same password
l1.daemon.start(stdin=slave_fd, wait_for_initialized=False)
Expand Down

0 comments on commit 3def539

Please sign in to comment.