mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] reporting if creating template DB fails
Before this, if creating the DB failed the next worker would find themselves with an empty `template-` file, so they would take the path to *create* a template database, which would fail when trying to `mkdir` the `shared-` directory as the directory would already exist. The problem with this is this module would likely immediately fail and take down their worker, triggering a test suite failure for themselves and likely hiding the *true* failure cause (not sure why the originally failed worker isn't the first one to trigger a failure but there you go). By skipping the tests instead, we provide a lot more opportunity for the "true" failure to be revealed.
This commit is contained in:
parent
bf20127da9
commit
bf4cc09aa4
@ -331,7 +331,11 @@ class DbDict(dict):
|
||||
return db
|
||||
|
||||
d = (self._shared_dir / f'shared-{module}')
|
||||
d.mkdir()
|
||||
try:
|
||||
d.mkdir()
|
||||
except FileExistsError:
|
||||
pytest.skip(f"found shared dir for {module}, database creation has likely failed")
|
||||
|
||||
self[module] = db = 'template_%s' % uuid.uuid4()
|
||||
subprocess.run([
|
||||
'odoo', '--no-http',
|
||||
|
Loading…
Reference in New Issue
Block a user