You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
@@ -477,8 +477,11 @@ describe('Client', () => {
|
||||
assert.ok(id !== isolatedId);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
|
||||
async function killClient<M extends RedisModules, S extends RedisScripts>(client: RedisClientType<M, S>): Promise<void> {
|
||||
const onceErrorPromise = once(client, 'error');
|
||||
async function killClient<M extends RedisModules, S extends RedisScripts>(
|
||||
client: RedisClientType<M, S>,
|
||||
errorClient: RedisClientType<M, S> = client
|
||||
): Promise<void> {
|
||||
const onceErrorPromise = once(errorClient, 'error');
|
||||
await client.sendCommand(['QUIT']);
|
||||
await Promise.all([
|
||||
onceErrorPromise,
|
||||
@@ -503,6 +506,10 @@ describe('Client', () => {
|
||||
minimumDockerVersion: [6, 2] // CLIENT INFO
|
||||
});
|
||||
|
||||
testUtils.testWithClient('should propagated errors from "isolated" clients', client => {
|
||||
return client.executeIsolated(isolated => killClient(isolated, client));
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
|
||||
testUtils.testWithClient('scanIterator', async client => {
|
||||
const promises = [],
|
||||
keys = new Set();
|
||||
|
@@ -189,7 +189,7 @@ export default class RedisClient<M extends RedisModules, S extends RedisScripts>
|
||||
create: async () => {
|
||||
const duplicate = this.duplicate({
|
||||
isolationPoolOptions: undefined
|
||||
});
|
||||
}).on('error', err => this.emit('error', err));
|
||||
await duplicate.connect();
|
||||
return duplicate;
|
||||
},
|
||||
|
Reference in New Issue
Block a user