Set lock_path in tests
When lock_path is not set, the synchronized decorator doesn't work properly. This change is required so that synchronized can throw an exception when that happens instead of failing silently. Change-Id: I341a522e59fda3feb8e41379d06ad3c8f97e5597
This commit is contained in:
@@ -30,6 +30,7 @@ import copy
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import uuid
|
||||
|
||||
import fixtures
|
||||
@@ -251,6 +252,8 @@ class TestCase(testtools.TestCase):
|
||||
CONF.set_override('fatal_exception_format_errors', True)
|
||||
CONF.set_override('enabled', True, 'osapi_v3')
|
||||
CONF.set_override('force_dhcp_release', False)
|
||||
# This will be cleaned up by the NestedTempfile fixture
|
||||
CONF.set_override('lock_path', tempfile.mkdtemp())
|
||||
|
||||
def _restore_obj_registry(self):
|
||||
objects_base.NovaObject._obj_classes = self._base_test_obj_backup
|
||||
|
Reference in New Issue
Block a user