-
-
Notifications
You must be signed in to change notification settings - Fork 268
[FIX] test_server: Add ERROR log level #352
base: master
Are you sure you want to change the base?
Conversation
* Also listen for ERROR log level on versions >7
You need increase the number of EXPECTED ERROR for this first build from .travis.yml file in order to consider the new type of error. |
The problem with this is that sometimes we test that there are errors and that the errors raise, like this case: https://travis-ci.org/OCA/server-tools/jobs/166895188#L1045. Maybe tweaking EXPECTED_ERRORS can work for these cases. |
Why are we not catching the errors with |
They are caught that way, but this doesn't prevent the ERROR message in the log. |
That seems to only be in instances where a logger is specifically outputting an error message via
Regardless, that means we're on fairly thin ice with this solution in terms of scalability IMO. Is there ever an instance when log output is actually relevant to a test? It seems weird to me that we would test a log output, so what if we were to just raise the Odoo log level to |
bd52b5c
to
4cad6e5
Compare
The problem is that you don't have control over that message that is spit out by Odoo. You only control the exception with |
The case of example using Example:
We can use mute_logger in order to avoid show it.
For the sample modules of MQT we need the test case to validate that the errors are processed correctly, then we shouldn't use a mute. We are using a counter of errors. |
This is a questionable fix for #348 - not exactly sure how to test though 😑