diff --git a/tests/unit/replication/QueueProcessor.spec.js b/tests/unit/replication/QueueProcessor.spec.js index a69b3aa2f..60f5b0278 100644 --- a/tests/unit/replication/QueueProcessor.spec.js +++ b/tests/unit/replication/QueueProcessor.spec.js @@ -178,5 +178,10 @@ describe('Queue Processor', () => { sinon.assert.calledOnceWithExactly(res.writeHead, 200, { 'Content-Type': promClient.register.contentType }); sinon.assert.calledOnceWithExactly(res.end, fakeMetrics); }); + + it('should not crash without _consumer', async () => { + qp._consumer = undefined; + return assert.doesNotReject(async () => await qp.handleMetrics(res, log)); + }); }); });