Skip to content

Commit

Permalink
get more insight into connect failure in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Aug 1, 2020
1 parent 559c128 commit 2e8ea37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion poetry.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[virtualenvs]
create = true
in-project = true
path = "./.venv"
cache-dir = "."
path = ".venv"
9 changes: 6 additions & 3 deletions tests/test_debugger/test_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def server():
"""Start dashmips server."""
if SHOULD_START_SERVER:
debugger = Popen(split("python -m dashmips debug -i localhost -l tests/test_mips/smallest.mips"))
assert debugger.returncode is None, "dashmips exited before we could test"
time.sleep(0.2) # sleep so we can connect
assert debugger.returncode is None, "dashmips exited before we could test"
return debugger
return None

Expand All @@ -34,8 +34,11 @@ def test_connect(server):
"""Test that the socket is available for connecting."""
if server:
assert server.returncode is None, "Dashmips Exited before we could test!!"
s = net.create_connection(ADDRESS)
assert s is not None
try:
s = net.create_connection(ADDRESS)
assert s is not None
except ConnectionRefusedError as e:
assert False, "Failed to connect"


def test_handshake(server):
Expand Down

0 comments on commit 2e8ea37

Please sign in to comment.