mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(core): Ensure worker stops picking up new jobs while shutting down (#13714)
This commit is contained in:
@@ -202,7 +202,7 @@ describe('ScalingService', () => {
|
||||
});
|
||||
|
||||
describe('if worker', () => {
|
||||
it('should wait for running jobs to finish', async () => {
|
||||
it('should pause queue and wait for running jobs to finish', async () => {
|
||||
// @ts-expect-error readonly property
|
||||
instanceSettings.instanceType = 'worker';
|
||||
await scalingService.setupQueue();
|
||||
@@ -211,7 +211,7 @@ describe('ScalingService', () => {
|
||||
await scalingService.stop();
|
||||
|
||||
expect(getRunningJobsCountSpy).toHaveBeenCalled();
|
||||
expect(queue.pause).not.toHaveBeenCalled();
|
||||
expect(queue.pause).toHaveBeenCalled();
|
||||
expect(stopQueueRecoverySpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user