diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-08-21 22:40:04 +0200 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-08-22 14:20:48 +0200 |
| commit | 9b1daa1218f7adf9d741afba607ef5b55b16e3e6 (patch) | |
| tree | ae621a54e86b2bc8d1565a10f3013b0c4f854abf /addons/web/static/tests/fields/basic_fields_mobile_tests.js | |
| parent | 416b810eb504df9cc1b3ec6d24fb921734c526a8 (diff) | |
[FIX] web: no running services in tests and benchmark suites
This commit fixes two issues:
1. No error when running several mocked service providers in tests
Revision on https://github.com/odoo/odoo/commit/eea2366fd2b8398a6c8022f24adb722e5e16a6f4
In the commit above, the intent was to turn off the logic about
"Service Provider" in the tests environments. To do so, it was
mocking the methods to deploy services (`_deployServices`) and
the method to dispatch service calls (`_call_service`).
However, this was not enough, because such a mocked service provider
still tracks undeployed services. This is an issue in case there are
several mocked service providers running at the same time, because it
will raise an exception:
https://github.com/odoo/odoo/blob/master/addons/web/static/src/js/core/service_mixins.js#L24
Note that the tracked services are globally known by all services
providers, because the properties `services` and `UndeployedServices`
are objects that are set in the definition of the mixin.
To fix this issue, the `init` method of the `ServiceProviderMixin`
should not do anything on mocked service providers, so that they act
as if there were no service providers at all in the system. In
particular, those mocked service providers will not make changes on
the shared properties `services` and `UndeployedServices`.
2. No running services on top of benchmarks
The web client on top of the benchmark suite was not mocked in a way
to turn off the "Service Provider" logic. Similarly to the JS test
suites, services should not influence the execution of benchmarks.
Closes #26519
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_mobile_tests.js')
0 files changed, 0 insertions, 0 deletions
