0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Fixed flaky batch sending tests (#21604)

ref https://linear.app/ghost/issue/ENG-1749

Batch sending tests were failing with MySQL fairly regularly. It appears
to be a race condition where the listener for the batch sending job
having completed is returning too early, causing the subsequent
Bookshelf data model refresh to happen too soon.

This is a fundamental flaw in the JobManager awaitCompletion handler
(and how the batch sending system interacts with it) as there's no way
to identify one batch from another - they all use the same name, and we
don't pass along any metadata.
This commit is contained in:
Steve Larson 2024-11-12 16:15:43 -06:00 committed by GitHub
parent 097394bd88
commit 38f6bdaa72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,6 +109,7 @@ describe('Batch sending tests', function () {
value: false
}], {context: {internal: true}});
mockManager.restore();
await jobManager.allSettled();
});
before(async function () {