Skip to content

Commit

Permalink
fix(tests): Add missing awaits (#3273)
Browse files Browse the repository at this point in the history
Also add some more logs to help debug teardown timeout issues
  • Loading branch information
chakaz authored Jul 11, 2024
1 parent 9148abe commit 1daa801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/dragonfly/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def stop(self, kill=False):
# if the return code is negative it means termination by signal
# if the return code is positive it means abnormal exit
if proc.returncode != 0:
raise Exception("Dragfonfly did not terminate gracefully")
raise Exception("Dragonfly did not terminate gracefully")

except subprocess.TimeoutExpired:
# We need to send SIGUSR1 to DF such that it prints the stacktrace
Expand Down Expand Up @@ -330,7 +330,7 @@ def create(self, existing_port=None, **kwargs) -> DflyInstance:
args.setdefault("noversion_check", None)
# MacOs does not set it automatically, so we need to set it manually
args.setdefault("maxmemory", "8G")
vmod = "dragonfly_connection=1,accept_server=1,listener_interface=1,main_service=1,rdb_save=1,replica=1,cluster_family=1,dflycmd=1"
vmod = "dragonfly_connection=1,accept_server=1,listener_interface=1,main_service=1,rdb_save=1,replica=1,cluster_family=1,proactor_pool=1,dflycmd=1"
args.setdefault("vmodule", vmod)
args.setdefault("jsonpathv2")
args.setdefault("log_dir", self.params.log_dir)
Expand Down
4 changes: 2 additions & 2 deletions tests/dragonfly/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def __init__(self, host, port, remote_host, remote_port):
self.stop_connections = []
self.server = None

def __del__(self):
self.close()
async def __del__(self):
await self.close()

async def handle(self, reader, writer):
remote_reader, remote_writer = await asyncio.open_connection(
Expand Down

0 comments on commit 1daa801

Please sign in to comment.