test: wait until the unit finishes before checking the log
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 30 Sep 2022 07:31:47 +0000 (09:31 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 30 Sep 2022 09:47:09 +0000 (18:47 +0900)
commitbb0f817abf5994602d8ef5bd8568ab129a727a96
tree06e2d923b54a320f06df64dbb045f2bb47e04ee6
parent842a9d5f9174940ffe2bfddd1cd72654323ce27f
test: wait until the unit finishes before checking the log

Otherwise we might read an incomplete log and fail:

```
test_added_after (__main__.ExecutionResumeTest) ... FAIL
test_added_before (__main__.ExecutionResumeTest) ... ok
test_interleaved (__main__.ExecutionResumeTest) ... ok
test_issue_6533 (__main__.ExecutionResumeTest) ... ok
test_no_change (__main__.ExecutionResumeTest) ... ok
test_removal (__main__.ExecutionResumeTest) ... ok
test_swapped (__main__.ExecutionResumeTest) ... ok

======================================================================
FAIL: test_added_after (__main__.ExecutionResumeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/./test/test-exec-deserialization.py", line 152, in test_added_after
    self.check_output(expected_output)
  File "/build/./test/test-exec-deserialization.py", line 107, in check_output
    self.assertEqual(output, expected_output)
AssertionError: 'foo\n' != 'foo\nbar\n'
  foo
+ bar

----------------------------------------------------------------------
Ran 7 tests in 27.470s
```
test/test-exec-deserialization.py