-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Unittest poluted with warning about missing Qt translations #1537
Conversation
@buhtz Please also add a changelog entry 😉 |
I will wait with merging because it seems Arch still has problems. I asked for a detailed bug report. |
I think the failing unit test on ARCH may (still) happen because this fix is not yet contained. It contains "only": https://github.com/bit-team/backintime/commit/5202a3e46c134756a5ecd883947fa4d9ed2d557f.patch See the package build script for this: I am still racking my brain over how we could improve this bug hunt/fix/repackage/retest cycles but have no idea so far... |
Then we should merge?
Me, too. I have an idea to make the test more robust. But before trying this I will discuss another approach. And another more clean approach: I try to remember what I've learned from "Khorikov (2020) Unit Testing - Principles, Practices, and Patterns". The big questions in this test is if a local backup can be made successfully? backintime/common/test/test_backintime.py Lines 229 to 232 in 37018e0
You always have to weight the benefit and the cost of a test. Every test has a cost of maintenance, some more, some less. A test, even if it is an integration test, should never try to catch everything. Of course there is a (low!) risk that we might lose some information or cases where problems occur that could be covered by checking the log output on stdout/stderr. But this is not the intention of that test to cover unknown cases. Remember the last incidences with this test. There is this Qt-translation warning. There was the wayland and dbus messages, etc. Everytime that test failed and cost us time. But it did not failed because the behavior under test was not successful. It failed just because of a side effect it should not cover. No benefit just costs. Let's kill this output checking code. 😈 |
I am inclined to go this way. Still I would like to look back which issues could not have been fixed without the unit tests failing due to warnings (esp. AUR user are quite responsive because the installation fails due to unit tests failures; standard-packaged installations do unit testing only once at the maintainer side so user may not even realize that there is a warning that could help us to fix something). Shall we move this discussion into a new issue ("more robust unit tests")? |
I have downloaded and attached the unit test output, it clearly is caused by the translation warning too:
|
I think we can merge this PR since it fixes the reported failing unit test. @buhtz Do you push the changelog entry first before merging? |
While running unittest warning messages about missing qt translations are now ignored.
@graysky2 : Does this help with ARCH?
Note: I will refactor that whole test and create a check-output-but-ignore-the-rest-function() after the next release.