From 3089018e951dcca568574c0e0ebf9d8aab112389 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sun, 14 Feb 2021 22:42:47 -0500 Subject: Fixed #32446 -- Deprecated SERIALIZE test database setting. Whether or not the state of a test database should be serialized can be inferred from the set of databases allowed to be access from discovered TestCase/TransactionTestCase enabling the serialized_rollback feature which makes this setting unnecessary. This should make a significant test suite bootstraping time difference on large projects that didn't explicitly disable test database serialization. --- docs/topics/testing/advanced.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'docs/topics/testing') diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index b20812c745..97072eea83 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -718,7 +718,7 @@ utility methods in the ``django.test.utils`` module. Performs global post-test teardown, such as removing instrumentation from the template system and restoring normal email services. -.. function:: setup_databases(verbosity, interactive, *, time_keeper=None, keepdb=False, debug_sql=False, parallel=0, aliases=None, **kwargs) +.. function:: setup_databases(verbosity, interactive, *, time_keeper=None, keepdb=False, debug_sql=False, parallel=0, aliases=None, serialized_aliases=None, **kwargs) Creates the test databases. @@ -730,11 +730,20 @@ utility methods in the ``django.test.utils`` module. databases should be setup for. If it's not provided, it defaults to all of :setting:`DATABASES` aliases. + The ``serialized_aliases`` argument determines what subset of ``aliases`` + test databases should have their state serialized to allow usage of the + :ref:`serialized_rollback ` feature. If + it's not provided, it defaults to ``aliases``. + .. versionchanged:: 3.2 The ``time_keeper`` kwarg was added, and all kwargs were made keyword-only. + .. versionchanged:: 4.0 + + The ``serialized_aliases`` kwarg was added. + .. function:: teardown_databases(old_config, parallel=0, keepdb=False) Destroys the test databases, restoring pre-test conditions. -- cgit v1.3