Skip to content

Commit

Permalink
Debug, remove deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alippai authored Jan 8, 2024
1 parent b5031f0 commit 0078c27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 10 additions & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ passenv = *
commands =
pytest -s {posargs}
deps =
mock
parameterized
pyarrow
pytest
pytest-timeout
python-dateutil
starlette
uvicorn
vertica-python
Expand Down

0 comments on commit 0078c27

Please sign in to comment.