From 8d9827c06ce1592cca111e7eafb9ebe0153104ef Mon Sep 17 00:00:00 2001 From: Krzysztof Jagiello Date: Thu, 30 Sep 2021 19:13:56 +0200 Subject: Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase. Co-Authored-By: Adam Johnson --- docs/releases/4.1.txt | 3 ++- docs/topics/db/transactions.txt | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 041230b93a..7bfb527104 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -215,7 +215,8 @@ Templates Tests ~~~~~ -* ... +* A nested atomic block marked as durable in :class:`django.test.TestCase` now + raises a ``RuntimeError``, the same as outside of tests. URLs ~~~~ diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt index 313aa7d188..cd58f4d68e 100644 --- a/docs/topics/db/transactions.txt +++ b/docs/topics/db/transactions.txt @@ -238,11 +238,10 @@ Django provides a single API to control database transactions. is especially important if you're using :func:`atomic` in long-running processes, outside of Django's request / response cycle. -.. warning:: +.. versionchanged:: 4.1 - :class:`django.test.TestCase` disables the durability check to allow - testing durable atomic blocks in a transaction for performance reasons. Use - :class:`django.test.TransactionTestCase` for testing durability. + In older versions, the durability check was disabled in + :class:`django.test.TestCase`. Autocommit ========== -- cgit v1.3