Skip to content

Commit

Permalink
fix: Fix test_flushall_in_full_sync (#3929)
Browse files Browse the repository at this point in the history
* fix: Fix `test_flushall_in_full_sync`

This test failed in CI many times. The issue was that we reach stable
sync too quickly, and miss the full sync stage.

I changed the seeder to add 100k (instead of 30k) keys for the stage to
take longer.

* StaticSeeder
  • Loading branch information
chakaz authored Oct 15, 2024
1 parent a1830e1 commit c3f9ec1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/dragonfly/replication_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .seeder import Seeder as SeederV2
from . import dfly_args
from .proxy import Proxy
from .seeder import StaticSeeder

ADMIN_PORT = 1211

Expand Down Expand Up @@ -1107,8 +1108,8 @@ async def test_flushall_in_full_sync(df_factory):
c_replica = replica.client()

# Fill master with test data
seeder = SeederV2(key_target=30_000)
await seeder.run(c_master, target_deviation=0.1)
seeder = StaticSeeder(key_target=100_000)
await seeder.run(c_master)

# Start replication and wait for full sync
await c_replica.execute_command(f"REPLICAOF localhost {master.port}")
Expand Down

0 comments on commit c3f9ec1

Please sign in to comment.