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: test_snapshoting_during_migration #4555

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all 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
fix: test_snapshoting_during_migration
  • Loading branch information
BorysTheDev committed Feb 4, 2025
commit 54b92646748105032fbc439f66e3e8ec5a7e7c23
12 changes: 9 additions & 3 deletions tests/dragonfly/cluster_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ async def test_start_replication_during_migration(


@pytest.mark.parametrize("migration_first", [False, True])
@dfly_args({"proactor_threads": 4, "cluster_mode": "yes", "dbfilename": "snap_during_migration"})
@dfly_args({"proactor_threads": 4, "cluster_mode": "yes"})
async def test_snapshoting_during_migration(
df_factory: DflyInstanceFactory, df_seeder_factory: DflySeederFactory, migration_first: bool
):
Expand All @@ -1883,8 +1883,14 @@ async def test_snapshoting_during_migration(

The result should be the same: snapshot contains all the data that existed before migration
"""
dbfilename = f"snap_{tmp_file_name()}"
instances = [
df_factory.create(port=next(next_port), admin_port=next(next_port)) for i in range(2)
df_factory.create(
dbfilename=dbfilename if i == 0 else "",
port=next(next_port),
admin_port=next(next_port),
)
for i in range(2)
]
df_factory.start_all(instances)

Expand Down Expand Up @@ -1943,7 +1949,7 @@ async def start_save():
await nodes[1].client.execute_command(
"DFLY",
"LOAD",
"snap_during_migration-summary.dfs",
f"{dbfilename}-summary.dfs",
)

assert await seeder.compare(capture_before_migration, nodes[1].instance.port)
Expand Down
Loading