mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-12 02:45:45 +02:00
test: add test to test big collections or collections with big values (#3959)
This commit is contained in:
parent
119723316e
commit
dec0712e15
1 changed files with 31 additions and 0 deletions
|
@ -2626,3 +2626,34 @@ async def test_replica_of_replica(df_factory):
|
||||||
await c_replica2.execute_command(f"REPLICAOF localhost {replica.port}")
|
await c_replica2.execute_command(f"REPLICAOF localhost {replica.port}")
|
||||||
|
|
||||||
assert await c_replica2.execute_command(f"REPLICAOF localhost {master.port}") == "OK"
|
assert await c_replica2.execute_command(f"REPLICAOF localhost {master.port}") == "OK"
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
@pytest.mark.slow
|
||||||
|
async def test_big_containers(df_factory):
|
||||||
|
master = df_factory.create(proactor_threads=4)
|
||||||
|
replica = df_factory.create(proactor_threads=4)
|
||||||
|
|
||||||
|
df_factory.start_all([master, replica])
|
||||||
|
c_master = master.client()
|
||||||
|
c_replica = replica.client()
|
||||||
|
|
||||||
|
logging.debug("Fill master with test data")
|
||||||
|
seeder = StaticSeeder(
|
||||||
|
key_target=20,
|
||||||
|
data_size=4000000,
|
||||||
|
collection_size=1000,
|
||||||
|
variance=100,
|
||||||
|
samples=1,
|
||||||
|
types=["LIST", "SET", "ZSET", "HASH"],
|
||||||
|
)
|
||||||
|
await seeder.run(c_master)
|
||||||
|
|
||||||
|
logging.debug("Start replication and wait for full sync")
|
||||||
|
await c_replica.execute_command(f"REPLICAOF localhost {master.port}")
|
||||||
|
await wait_for_replicas_state(c_replica)
|
||||||
|
|
||||||
|
# Check replica data consisten
|
||||||
|
replica_data = await StaticSeeder.capture(c_replica)
|
||||||
|
master_data = await StaticSeeder.capture(c_master)
|
||||||
|
assert master_data == replica_data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue