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 (
|
||||
set_thread_name, printLock,
|
||||
addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread)
|
||||
from helper_test import TestCoreDummy
|
||||
|
||||
|
||||
def _fixSocket():
|
||||
|
@ -369,14 +370,22 @@ class Main(object):
|
|||
and time.time() - state.last_api_response >= 30
|
||||
):
|
||||
self.stop()
|
||||
elif not state.enableGUI:
|
||||
else:
|
||||
state.enableGUI = True
|
||||
# pylint: disable=relative-import
|
||||
from tests import core as test_core
|
||||
test_core_result = test_core.run()
|
||||
state.enableGUI = True
|
||||
self.stop()
|
||||
test_core.cleanup()
|
||||
test_core_result = TestCoreDummy(errors = 1,failures = 1)
|
||||
try:
|
||||
from tests import core as test_core
|
||||
test_core_result = test_core.run()
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
state.enableGUI = True
|
||||
self.stop()
|
||||
try:
|
||||
test_core.cleanup()
|
||||
except:
|
||||
pass
|
||||
sys.exit(
|
||||
'Core tests failed!'
|
||||
if test_core_result.errors or test_core_result.failures
|
||||
|
@ -489,4 +498,4 @@ if __name__ == "__main__":
|
|||
|
||||
# So far, the creation of and management of the Bitmessage protocol and this
|
||||
# client is a one-man operation. Bitcoin tips are quite appreciated.
|
||||
# 1H5XaDA6fYENLbknwZyjiYXYPQaFjjLX2u
|
||||
# 1H5XaDA6fYENLbknwZyjiYXYPQaFjjLX2u
|
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