Commit 0c53c6b6 authored by Samuel GAIST's avatar Samuel GAIST Committed by André Anjos

[test|settings] Make the refresh timeout configurable, default is 10s

This is used in scheduling tests were the database can be modified
from outside processes.
parent 500051df
......@@ -49,6 +49,8 @@ DATABASES["default"]["TEST"] = {"NAME": DATABASES["default"]["NAME"]} # noqa
DATABASES["default"]["OPTIONS"]["timeout"] = 30 # noqa
DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa
# Timeout used in test when waiting for an update
DB_REFRESH_TIMEOUT = int(os.environ.get("DB_REFRESH_TIMEOUT", 10))
if "beat.cmdline" in sys.argv:
# make it in-memory for cmdline app tests
......
......@@ -144,7 +144,7 @@ class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin):
self.workers = {}
self.command_verbosity = 3
self.timeout = 10 # Failure timeout
self.timeout = settings.DB_REFRESH_TIMEOUT # Failure timeout
@classmethod
def setUpTestData(cls):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment