TEST-04-JOURNAL: sync journal in test script, and find journal with invocation ID
Hopefully improve the stability of the test.
This commit is contained in:
@@ -3,9 +3,8 @@ Description=Log filtering unit
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=sh -c 'echo "Logging from the service, and ~more~ foo bar"'
|
||||
# If the service finishes extremely fast, journald cannot find the source of the
|
||||
# stream. Hence, we need to call 'journalctl --sync' before service finishes.
|
||||
ExecStart=journalctl --sync
|
||||
ExecStart=sh -c 'echo "Logging from the service, and ~more~ foo bar"; journalctl --sync'
|
||||
SyslogLevel=notice
|
||||
LogLevelMax=info
|
||||
|
||||
Reference in New Issue
Block a user