0

I'm using a primary-replica architecture for Django testing. The implementation is pretty straight-forward, as seen here.

The thing is that some tests are passing non deterministically: for example, they fail when I run that specifiy TransactionTestCase, but they pass when I run all of them. Then maybe they pass when I run the TranstactionTestCase, but if I run them isolatedly, they fail. The failure reason always is that some object created in the primary database is not found on the replica one. It's hard to understand why, specially considering that both databases are actually just one, according to the documentation provided above.

I believe that my setup is correct, and tests do pass sometimes, so sometimes the replication is performed correctly. I just followed the documentation, and expected correct replication between databases. Does any one know what the issue may be? Is there a way to force synchronous replication using Django testing?

0 Answers0