diff --git a/tests/test_base.py b/tests/test_base.py index af5439c..d11dbb1 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -7,12 +7,15 @@ from global_state import finish +i = 0 + class Server(uvicorn.Server): def install_signal_handlers(self): pass @contextlib.contextmanager def run_in_thread(self): + print('run_in_thread') thread = threading.Thread(target=self.run) print('Starting') thread.start() @@ -21,14 +24,21 @@ def run_in_thread(self): while not self.started: print(f'Not started: {self.started}') time.sleep(1) + if i > 30: + raise Exception('Server start failed') + else: + i += 1 yield finally: print('Exiting') self.should_exit = True thread.join() +print('Before config') config = uvicorn.Config("fake_webhdfs:app", host="127.0.0.1", port=8000, log_level="trace") +print('Before server') server = Server(config=config) +print('After server') def test_read_main(): connection = vp.connect( diff --git a/tox.ini b/tox.ini index 6458814..ef648ef 100644 --- a/tox.ini +++ b/tox.ini @@ -6,12 +6,8 @@ passenv = * commands = pytest -s {posargs} deps = - mock - parameterized pyarrow pytest - pytest-timeout - python-dateutil starlette uvicorn vertica-python