You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix tests for background task behaviour in Wagtail 6.4 (#255)
In Wagtail 6.4 (wagtail/wagtail#12787), updating the search index and reference index after a database update are now handled as background tasks through the django-tasks library. In the default configuration, this happens at the end of the current transaction (if any), and since unit tests are typically wrapped in a transaction, we can no longer count on the results of database updates within tests being immediately visible in search and object usage queries. To ensure that these tasks are executed, we trigger the oncommit hooks via `self.captureOnCommitCallbacks(execute=True)`.
0 commit comments