Hi,
To integrate a "read-replica" in my test suite I'm very clever. I just say "master = master_connection" and "slave = master_connection". The test suite has no idea there is a read-replica at all.
Unfortunately, the coverage I get is not comprehensive. Because a "slave" connection in this context could write to the database and cause errors in production. So I need some way to differentiate the connections without breaking the external transaction. Any thoughts on how I could do this? Any argument I can pass to the sessionmaker to make it read-only while still making the data in the transaction available to each?
Thanks!