From 23b7ae2a1a57de5a3e1861ffb7805394ca339cc2 Mon Sep 17 00:00:00 2001 From: Dmitry Teselkin Date: Mon, 30 Nov 2015 21:30:34 +0300 Subject: [PATCH] Workaround to get ostf working Temporary solution, after stabilisation should be removed. Related-Bug: #1522941 Change-Id: Ida45bea2ba979748bf6853ef947fc665f865ed42 --- fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py b/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py index 9d8d53a8..32efbfc9 100644 --- a/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py +++ b/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py @@ -16,6 +16,7 @@ import fcntl import logging import os import signal +import time try: from oslo.config import cfg @@ -79,6 +80,11 @@ class NoseDriver(object): raise InterruptTestRunException() signal.signal(signal.SIGUSR1, raise_exception_handler) + # FIXME(dteselkin): add some sleep to allow process to + # initialize db before selecting data + # LP#1522941 + time.sleep(1) + with engine.contexted_session(dbpath) as session: testrun = session.query(models.TestRun)\ .filter_by(id=test_run_id)\