Skip to content

Commit 24c2c86

Browse files
authored
fix #1917 - CLIENT UNPAUSE (#2128)
* fix #1917 - CLIENT UNPAUSE * fix CLIENT UNPAUSE
1 parent 3ec17e3 commit 24c2c86

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

packages/client/lib/client/commands.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import * as CLIENT_KILL from '../commands/CLIENT_KILL';
2424
import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT';
2525
import * as CLIENT_PAUSE from '../commands/CLIENT_PAUSE';
2626
import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME';
27+
import * as CLIENT_UNPAUSE from '../commands/CLIENT_UNPAUSE';
2728
import * as CLIENT_INFO from '../commands/CLIENT_INFO';
2829
import * as CLUSTER_ADDSLOTS from '../commands/CLUSTER_ADDSLOTS';
2930
import * as CLUSTER_ADDSLOTSRANGE from '../commands/CLUSTER_ADDSLOTSRANGE';
@@ -164,6 +165,8 @@ export default {
164165
clientPause: CLIENT_PAUSE,
165166
CLIENT_SETNAME,
166167
clientSetName: CLIENT_SETNAME,
168+
CLIENT_UNPAUSE,
169+
clientUnpause: CLIENT_UNPAUSE,
167170
CLIENT_INFO,
168171
clientInfo: CLIENT_INFO,
169172
CLUSTER_ADDSLOTS,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { strict as assert } from 'assert';
2+
import testUtils, { GLOBAL } from '../test-utils';
3+
import { transformArguments } from './CLIENT_UNPAUSE';
4+
5+
describe('CLIENT UNPAUSE', () => {
6+
testUtils.isVersionGreaterThanHook([6, 2]);
7+
8+
it('transformArguments', () => {
9+
assert.deepEqual(
10+
transformArguments(),
11+
['CLIENT', 'UNPAUSE']
12+
);
13+
});
14+
15+
testUtils.testWithClient('client.unpause', async client => {
16+
assert.equal(
17+
await client.clientUnpause(),
18+
'OK'
19+
);
20+
}, GLOBAL.SERVERS.OPEN);
21+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { RedisCommandArguments } from '.';
2+
3+
export function transformArguments(): RedisCommandArguments {
4+
return ['CLIENT', 'UNPAUSE'];
5+
}
6+
7+
export declare function transformReply(): 'OK' | Buffer;

0 commit comments

Comments
 (0)