test: Dump log for any stuck test
This commit is contained in:
parent
36f713b14c
commit
a6db2d0429
1 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import copy
|
||||
import faulthandler
|
||||
import logging
|
||||
import sys
|
||||
from contextlib import AbstractContextManager, contextmanager
|
||||
from types import MappingProxyType
|
||||
|
||||
|
|
@ -12,6 +14,8 @@ from .unit_test_case import UnitTestCase
|
|||
|
||||
logger = logging.Logger(__file__)
|
||||
|
||||
STUCK_TEST_THRESHOLD = 5 * 60
|
||||
|
||||
|
||||
class IntegrationTestCase(UnitTestCase):
|
||||
"""Integration test class for Frappe tests.
|
||||
|
|
@ -74,6 +78,8 @@ class IntegrationTestCase(UnitTestCase):
|
|||
super().tearDownClass()
|
||||
|
||||
def setUp(self) -> None:
|
||||
faulthandler.dump_traceback_later(STUCK_TEST_THRESHOLD, file=sys.__stderr__)
|
||||
self.addCleanup(faulthandler.cancel_dump_traceback_later)
|
||||
super().setUp()
|
||||
# Add any per-test setup code here
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue