Workaround to get ostf working

Temporary solution, after stabilisation
should be removed.

Related-Bug: #1522941
Change-Id: Ida45bea2ba979748bf6853ef947fc665f865ed42
This commit is contained in:
Dmitry Teselkin 2015-11-30 21:30:34 +03:00 committed by Nastya Urlapova
parent 74af9c012e
commit 23b7ae2a1a
1 changed files with 6 additions and 0 deletions

View File

@ -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)\