1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/connection_adapters
Eileen Uchitelle 1284f826cc Fix error raised when handler doesn't exist
While working on another feature for multiple databases (auto-switching)
I observed that in development the first request won't autoload the
application record connection for the primary database and may not yet
know about the replica connection.

In my test application this caused the application to thrown an error if
I tried to send the first request to the replica before the replica was
connected. This wouldn't be an issue in production because the
application is preloaded.

In order to fix this I decided to leave the original error message and
delete the new error message. I updated the original error message to
include the `role` to make it a bit clearer that the connection isn't
established for that particular role.

The error now reads:

```
No connection pool with 'primary' found for the 'reading' role.
```

A single database application will continue uisng the original error
message:

```
No connection pool with 'primary' found.
```
2019-01-25 09:56:43 -05:00
..
adapter_leasing_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
connection_handler_test.rb Exercise stringify of database configurations 2018-10-05 14:42:15 +03:00
connection_handlers_multi_db_test.rb Fix error raised when handler doesn't exist 2019-01-25 09:56:43 -05:00
connection_specification_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
merge_and_resolve_default_url_config_test.rb Refactors Active Record connection management 2018-08-30 10:06:45 -04:00
mysql_type_lookup_test.rb ♻️ Fix mysql type map for enum and set 2019-01-08 14:56:46 +09:00
schema_cache_test.rb Only define attribute methods from schema cache 2018-09-28 21:16:21 +01:00
type_lookup_test.rb Revert commit 4ec5b0d6b4 in favor of #28379 2018-01-07 10:17:36 +09:00