typegoose / mongodb-memory-server

Manage & spin up mongodb server binaries with zero(or slight) configuration for tests.
https://typegoose.github.io/mongodb-memory-server/
MIT License
2.56k stars 185 forks source link

ReplicaSet - emulate replication lag #863

Closed konstantinzelinsky closed 4 months ago

konstantinzelinsky commented 4 months ago

Versions

package: mongo-memory-server

What is your question?

We are using this library for the e2e-testing on our project and want to detect potential problems with replication lag. Is there any way we can emulate a large replication delay? Have already tried to use secondaryDelaySecs as a configuration option for the replica instance. But it's supported and works only with hidden instances. Maybe there is some other solution to use this library and configure replication lag?

hasezoey commented 4 months ago

i am personally not aware of any other way than those secondaryDelaySecs option