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:
parent
097394bd88
commit
38f6bdaa72
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ describe('Batch sending tests', function () {
|
|||
value: false
|
||||
}], {context: {internal: true}});
|
||||
mockManager.restore();
|
||||
await jobManager.allSettled();
|
||||
});
|
||||
|
||||
before(async function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue