fix: LiveQueryServer crashes using cacheAdapter on disconnect from Redis 4 server (#9615)

This commit is contained in:
Mohammad Ali
2025-02-24 03:48:34 +02:00
committed by GitHub
parent 79204f73f4
commit 0769215d4c
4 changed files with 23 additions and 5 deletions

View File

@@ -3,7 +3,10 @@ const RedisPubSub = require('../lib/Adapters/PubSub/RedisPubSub').RedisPubSub;
describe('RedisPubSub', function () {
beforeEach(function (done) {
// Mock redis
const createClient = jasmine.createSpy('createClient');
const createClient = jasmine.createSpy('createClient').and.returnValue({
connect: jasmine.createSpy('connect').and.resolveTo(),
on: jasmine.createSpy('on'),
});
jasmine.mockLibrary('redis', 'createClient', createClient);
done();
});