Skip to content
Snippets Groups Projects
Commit 02a75a56 authored by Géry Debongnie's avatar Géry Debongnie
Browse files

[FIX] web: race condition in crash manager test


Since commit 2716828f, the error dialog
has an additional JS lib dependency, which means that it may needs to
perform a request before it opens up. However, a test in the
crashmanager was only waiting for a next tick, which is possibly too
short for a network request.

So, depending on the network speed (and on the test order), this test
could fail. To fix it, we simply make sure that the test also wait for
the library to be loaded

closes odoo/odoo#66546

Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent 9691190e
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ odoo.define('web.crash_manager_tests', function (require) {
const Bus = require('web.Bus');
const testUtils = require('web.test_utils');
const core = require('web.core');
const ajax = require('web.ajax');
const createActionManager = testUtils.createActionManager;
QUnit.module('Services', {}, function() {
......@@ -46,6 +47,7 @@ QUnit.module('Services', {}, function() {
]
}
});
await ajax.loadJS('/web/static/lib/stacktracejs/stacktrace.js');
await testUtils.nextTick();
var modal_selector = 'div.modal:contains("crash_manager_tests_warning_modal_text")';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment