Skip to content

Copy of #112 to troubleshoot sqlite CI failures - #113

Closed
gasman wants to merge 3 commits into
wagtail:mainfrom
gasman:treebeard-sync-2
Closed

Copy of #112 to troubleshoot sqlite CI failures#113
gasman wants to merge 3 commits into
wagtail:mainfrom
gasman:treebeard-sync-2

Conversation

@gasman

@gasman gasman commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gasman gasman closed this Sep 2, 2026
@gasman gasman reopened this Sep 2, 2026
Various tests were redundantly calling self.backend.add on model instances created during tests. This is unnecessary because the post_save signal handler is in force (AUTO_UPDATE is True on the backend), and the task runner is set to ImmediateBackend (and since django-tasks 0.10 this no longer waits until the end of the transaction). However, calling refresh() on the index is still necessary to flush all pending operations at the Elasticsearch/Opensearch end.

test_add_bulk has the opposite problem - we don't want the signal to be triggered, so that we can verify that add_bulk is doing its job. So, create the records with bulk_create to bypass the signal.
@gasman gasman closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant