diff options
| author | Raphael Collet <rco@odoo.com> | 2019-09-24 08:45:54 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-09-24 08:45:54 +0000 |
| commit | e4fc7568c1252bb9fe68f52411f99d132ec3b94f (patch) | |
| tree | 9c9029bfb2bdd6e85b9d8477f418280eb9ceb0b0 /addons/account/static/src | |
| parent | a15d3a710c2f27594d658806055f1c62e092bb44 (diff) | |
[FIX] tests: clean up environments in `SavepointCase`
The following issue occurs nondeterministically: a test fails when
trying to flush pending updates with a user id that does not exist.
This only happens with `SavepointCase` tests.
Here is the explanation: the method `cr.savepoint()` retrieves an
environment to flush pending updates, and the chosen environment has a
user that was created in another test, and thus no longer exists. The
problem is that `Environments.envs` contains environments that are no
longer supposed to be used.
The solution consists in, after the test, discarding the environments
that were not present before the test.
closes odoo/odoo#37341
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/account/static/src')
0 files changed, 0 insertions, 0 deletions
