Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pytest): Add master restart delay #909

Merged
merged 3 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/dragonfly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def stop(self, kill=False):
except subprocess.TimeoutExpired:
print("Unable to terminate DragonflyDB gracefully, it was killed")
proc.kill()
proc.communicate()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not print the results? https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
or does it print it internally?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see the print above when test run? and where did you see the port print?
I found this fail for the disconnect replication fail and I dont see those prints
https://github.com/dragonflydb/dragonfly/actions/runs/4335282784/jobs/7569761257#step:6:1582

Copy link
Contributor Author

@dranikpg dranikpg Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, its unrelated to the failing test, sorry, I just added this line for correctness


def _start(self):
base_args = [f"--{v}" for v in self.params.args]
Expand Down
1 change: 1 addition & 0 deletions tests/dragonfly/replication_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ async def crash_master_fs():
master.stop(kill=True)

async def start_master():
await asyncio.sleep(0.2)
master.start()
c_master = aioredis.Redis(port=master.port)
assert await c_master.ping()
Expand Down