mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
1c98e6c005
Since test fixtures share connections (due to transactional tests) we end up overwriting the reading configuration so Rails doesn't recognize it as a replica connection. This change ensures that if we're using the `reading` role that connections will always have prevent writes turned on. If you need a replica connection that does not block writes, you should use a different role name other than `:reading`. The db selector test and connection handlers test have been updated to test for these changes. In the db selector test we don't always have a writing handler so I updated test fixtures to return if that's nil. Lastly one test needed to be updated to use a different handler name due to it needing to write to successfully test what it needs to test. Fixes #37765 |
||
---|---|---|
.. | ||
adapter_leasing_test.rb | ||
connection_handler_test.rb | ||
connection_handlers_multi_db_test.rb | ||
connection_handlers_multi_pool_config_test.rb | ||
merge_and_resolve_default_url_config_test.rb | ||
mysql_type_lookup_test.rb | ||
schema_cache_test.rb | ||
type_lookup_test.rb |