#50616 Issue 50615 - Log current test name to journald
Closed by spichugi. Opened by vashirov.
vashirov/389-ds-base log_current_test  into  master

Download 50616.patch

Bug Description:
Sometimes server crashes during test execution, events about crash are
logged to journald. But it's not easy to tell in which test the crash
happened, especially during the full test run.

Fix Description:
Add a fixture that is used automatically for all tests (if the server is
built with systemd) on setup and teardown, and logs a message to journald

Fixes: https://pagure.io/389-ds-base/issue/50615

Reviewed by: ???

Sample output in journalctl:

Sep 19 18:56:40 server-f30.example.com pytest[4277]: tests/suites/basic/basic_test.py::test_basic_ops (setup)
Sep 19 18:56:41 server-f30.example.com ns-slapd[4203]: [19/Sep/2019:18:56:41.487538080 +0000] - ERR - conn=1 op=16 - urp_fixup_add_cenotaph - failed to add cenotaph, err= 21
Sep 19 18:56:41 server-f30.example.com ns-slapd[4203]: [19/Sep/2019:18:56:41.502234546 +0000] - ERR - conn=1 op=17 - urp_fixup_add_cenotaph - failed to add cenotaph, err= 21
Sep 19 18:56:41 server-f30.example.com ns-slapd[4203]: [19/Sep/2019:18:56:41.753788840 +0000] - ERR - conn=1 op=18 - urp_fixup_add_cenotaph - failed to add cenotaph, err= 21
Sep 19 18:56:41 server-f30.example.com pytest[4280]: tests/suites/basic/basic_test.py::test_basic_ops (teardown)

rebased onto 56ea32d66c602b1d160b240046ad801d2c1afcae

Pull-Request has been merged by vashirov

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3671

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata