Stuck forever in apiTest on MainProcess terminating
This commit is contained in:
parent
6b65113bb4
commit
350ec4416f
|
@ -51,6 +51,7 @@ from singleinstance import singleinstance
|
||||||
from threads import (
|
from threads import (
|
||||||
set_thread_name, printLock,
|
set_thread_name, printLock,
|
||||||
addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread)
|
addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread)
|
||||||
|
from helper_test import TestCoreDummy
|
||||||
|
|
||||||
|
|
||||||
def _fixSocket():
|
def _fixSocket():
|
||||||
|
@ -369,14 +370,22 @@ class Main(object):
|
||||||
and time.time() - state.last_api_response >= 30
|
and time.time() - state.last_api_response >= 30
|
||||||
):
|
):
|
||||||
self.stop()
|
self.stop()
|
||||||
elif not state.enableGUI:
|
else:
|
||||||
state.enableGUI = True
|
state.enableGUI = True
|
||||||
# pylint: disable=relative-import
|
# pylint: disable=relative-import
|
||||||
|
test_core_result = TestCoreDummy(errors = 1,failures = 1)
|
||||||
|
try:
|
||||||
from tests import core as test_core
|
from tests import core as test_core
|
||||||
test_core_result = test_core.run()
|
test_core_result = test_core.run()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
finally:
|
||||||
state.enableGUI = True
|
state.enableGUI = True
|
||||||
self.stop()
|
self.stop()
|
||||||
|
try:
|
||||||
test_core.cleanup()
|
test_core.cleanup()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
sys.exit(
|
sys.exit(
|
||||||
'Core tests failed!'
|
'Core tests failed!'
|
||||||
if test_core_result.errors or test_core_result.failures
|
if test_core_result.errors or test_core_result.failures
|
||||||
|
|
10
src/helper_test.py
Normal file
10
src/helper_test.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
"""
|
||||||
|
src/helper_test.py
|
||||||
|
=================================
|
||||||
|
"""
|
||||||
|
import collections
|
||||||
|
|
||||||
|
"""
|
||||||
|
Core Dummy testcase instance
|
||||||
|
"""
|
||||||
|
TestCoreDummy = collections.namedtuple('TestCoreDummy',['errors','failures'])
|
Reference in New Issue
Block a user