database transaction commit issue within a test (3.1+)

We have some tests that call django.db.connection._commit() in them, and from django3.1 onwards it seems to cause the transaction used in the test to actually be be committed, and the data saved to the test database, rather than rolled back at the end of the test.

In django 3.0 and before this works fine.

We’re doing it to ensure that db operations are saved in different threads (the threading is really just an emulation of running commands from different django instances).

So, any suggestions of alternates to _commit? Or if I knew the ticket/commit/pr that made the change that’d be (probably) helpful too.

(olympia/test_commands.py at 16492-django32-es-job-fixes · eviljeff/olympia · GitHub leading to CI test fail:
https://app.circleci.com/pipelines/github/eviljeff/olympia/184/workflows/451ec431-149d-44c0-b075-4ff59fd094d8/jobs/2436/parallel-runs/0/steps/0-113)