You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
wip
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, MIN_BLOCKING_TIME } from '../test-utils';
|
||||
import BLMOVE from './BLMOVE';
|
||||
|
||||
describe('BLMOVE', () => {
|
||||
@@ -14,7 +14,7 @@ describe('BLMOVE', () => {
|
||||
|
||||
testUtils.testAll('blMove - null', async client => {
|
||||
assert.equal(
|
||||
await client.blMove('{tag}source', '{tag}destination', 'LEFT', 'RIGHT', Number.MIN_VALUE),
|
||||
await client.blMove('{tag}source', '{tag}destination', 'LEFT', 'RIGHT', MIN_BLOCKING_TIME),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
@@ -25,7 +25,7 @@ describe('BLMOVE', () => {
|
||||
testUtils.testAll('blMove - with member', async client => {
|
||||
const [, reply] = await Promise.all([
|
||||
client.lPush('{tag}source', 'element'),
|
||||
client.blMove('{tag}source', '{tag}destination', 'LEFT', 'RIGHT', Number.MIN_VALUE)
|
||||
client.blMove('{tag}source', '{tag}destination', 'LEFT', 'RIGHT', MIN_BLOCKING_TIME)
|
||||
]);
|
||||
assert.equal(reply, 'element');
|
||||
}, {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, MIN_BLOCKING_TIME } from '../test-utils';
|
||||
import BLMPOP from './BLMPOP';
|
||||
|
||||
describe('BLMPOP', () => {
|
||||
@@ -25,7 +25,7 @@ describe('BLMPOP', () => {
|
||||
|
||||
testUtils.testAll('blmPop - null', async client => {
|
||||
assert.equal(
|
||||
await client.blmPop(Number.MIN_VALUE, 'key', 'RIGHT'),
|
||||
await client.blmPop(MIN_BLOCKING_TIME, 'key', 'RIGHT'),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
@@ -36,7 +36,7 @@ describe('BLMPOP', () => {
|
||||
testUtils.testAll('blmPop - with member', async client => {
|
||||
const [, reply] = await Promise.all([
|
||||
client.lPush('key', 'element'),
|
||||
client.blmPop(Number.MIN_VALUE, 'key', 'RIGHT')
|
||||
client.blmPop(MIN_BLOCKING_TIME, 'key', 'RIGHT')
|
||||
]);
|
||||
assert.deepEqual(reply, [
|
||||
'key',
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BLPOP from './BLPOP';
|
||||
|
||||
describe('BLPOP', () => {
|
||||
@@ -21,7 +21,7 @@ describe('BLPOP', () => {
|
||||
|
||||
testUtils.testAll('blPop - null', async client => {
|
||||
assert.equal(
|
||||
await client.blPop('key', Number.MIN_VALUE),
|
||||
await client.blPop('key', BLOCKING_MIN_VALUE),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BRPOP from './BRPOP';
|
||||
|
||||
describe('BRPOP', () => {
|
||||
@@ -21,7 +21,7 @@ describe('BRPOP', () => {
|
||||
|
||||
testUtils.testAll('brPop - null', async client => {
|
||||
assert.equal(
|
||||
await client.brPop('key', Number.MIN_VALUE),
|
||||
await client.brPop('key', BLOCKING_MIN_VALUE),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BRPOPLPUSH from './BRPOPLPUSH';
|
||||
|
||||
describe('BRPOPLPUSH', () => {
|
||||
@@ -15,7 +15,7 @@ describe('BRPOPLPUSH', () => {
|
||||
await client.brPopLPush(
|
||||
'{tag}source',
|
||||
'{tag}destination',
|
||||
Number.MIN_VALUE
|
||||
BLOCKING_MIN_VALUE
|
||||
),
|
||||
null
|
||||
);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZMPOP from './BZMPOP';
|
||||
|
||||
describe('BZMPOP', () => {
|
||||
@@ -25,7 +25,7 @@ describe('BZMPOP', () => {
|
||||
|
||||
testUtils.testAll('bzmPop - null', async client => {
|
||||
assert.equal(
|
||||
await client.bzmPop(Number.MIN_VALUE, 'key', 'MAX'),
|
||||
await client.bzmPop(BLOCKING_MIN_VALUE, 'key', 'MAX'),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
@@ -41,7 +41,7 @@ describe('BZMPOP', () => {
|
||||
},
|
||||
[, reply] = await Promise.all([
|
||||
client.zAdd(key, member),
|
||||
client.bzmPop(Number.MIN_VALUE, key, 'MAX')
|
||||
client.bzmPop(BLOCKING_MIN_VALUE, key, 'MAX')
|
||||
]);
|
||||
|
||||
assert.deepEqual(reply, {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZPOPMAX from './BZPOPMAX';
|
||||
|
||||
describe('BZPOPMAX', () => {
|
||||
@@ -21,7 +21,7 @@ describe('BZPOPMAX', () => {
|
||||
|
||||
testUtils.testAll('bzPopMax - null', async client => {
|
||||
assert.equal(
|
||||
await client.bzPopMax('key', Number.MIN_VALUE),
|
||||
await client.bzPopMax('key', BLOCKING_MIN_VALUE),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
@@ -37,7 +37,7 @@ describe('BZPOPMAX', () => {
|
||||
},
|
||||
[, reply] = await Promise.all([
|
||||
client.zAdd(key, member),
|
||||
client.bzPopMax(key, Number.MIN_VALUE)
|
||||
client.bzPopMax(key, BLOCKING_MIN_VALUE)
|
||||
]);
|
||||
|
||||
assert.deepEqual(reply, {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZPOPMIN from './BZPOPMIN';
|
||||
|
||||
describe('BZPOPMIN', () => {
|
||||
@@ -21,7 +21,7 @@ describe('BZPOPMIN', () => {
|
||||
|
||||
testUtils.testAll('bzPopMin - null', async client => {
|
||||
assert.equal(
|
||||
await client.bzPopMin('key', Number.MIN_VALUE),
|
||||
await client.bzPopMin('key', BLOCKING_MIN_VALUE),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
@@ -37,7 +37,7 @@ describe('BZPOPMIN', () => {
|
||||
},
|
||||
[, reply] = await Promise.all([
|
||||
client.zAdd(key, member),
|
||||
client.bzPopMin(key, Number.MIN_VALUE)
|
||||
client.bzPopMin(key, BLOCKING_MIN_VALUE)
|
||||
]);
|
||||
|
||||
assert.deepEqual(reply, {
|
||||
|
Reference in New Issue
Block a user