Delegate to DB backends the task of detecting when different DATABASES item values point to different RDBMS test DBs
|Reported by:||ramiro||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In r14696/r14822 we fixed the ability to detect and handle without data loss database definitions that point to the same RDBMS database when setting up/tearing down tests.
The tuple of values used to distinguish among them contains (HOST, PORT ENGINE, NAME). In Oracle test setup all these values can be identical among two DATABASES item values but still point to different databases (actually tablespaces, in the Oracle nomenclature), even further, they usually will be the same when using a single Oracle installation. Shai also hinted about MS SQL possible needing more variables in the mix for similar reasons.
The patch attached to this ticket moves that to a method of BaseDatabaseCreation so it can be customized by the backends that need this. This reduces again the number of test suite failures happening in Oracle (currently, tests that assume the default and other databases are mutually isolated do fail.)
Change History (8)
Changed 3 years ago by ramiro
comment:1 Changed 3 years ago by ramiro
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Summary changed from Delegate to DB backends the task of when two DATABASES item values point to different RDBMS test DBs to Delegate to DB backends the task of detecting when different DATABASES item values point to different RDBMS test DBs