mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix: test_snapshoting_during_migration (#4555)
This commit is contained in:
parent
abe3306abd
commit
6c68519f02
1 changed files with 9 additions and 3 deletions
|
@ -1871,7 +1871,7 @@ async def test_start_replication_during_migration(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("migration_first", [False, True])
|
@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(
|
async def test_snapshoting_during_migration(
|
||||||
df_factory: DflyInstanceFactory, df_seeder_factory: DflySeederFactory, migration_first: bool
|
df_factory: DflyInstanceFactory, df_seeder_factory: DflySeederFactory, migration_first: bool
|
||||||
):
|
):
|
||||||
|
@ -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
|
The result should be the same: snapshot contains all the data that existed before migration
|
||||||
"""
|
"""
|
||||||
|
dbfilename = f"snap_{tmp_file_name()}"
|
||||||
instances = [
|
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)
|
df_factory.start_all(instances)
|
||||||
|
|
||||||
|
@ -1943,7 +1949,7 @@ async def test_snapshoting_during_migration(
|
||||||
await nodes[1].client.execute_command(
|
await nodes[1].client.execute_command(
|
||||||
"DFLY",
|
"DFLY",
|
||||||
"LOAD",
|
"LOAD",
|
||||||
"snap_during_migration-summary.dfs",
|
f"{dbfilename}-summary.dfs",
|
||||||
)
|
)
|
||||||
|
|
||||||
assert await seeder.compare(capture_before_migration, nodes[1].instance.port)
|
assert await seeder.compare(capture_before_migration, nodes[1].instance.port)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue