Skip to content

Commit f03c758

Browse files
committed
[CAE-686] Bumped docker version to 8.0-M05-pre, enabled and fixed tests
1 parent f5fbb92 commit f03c758

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

Diff for: packages/client/lib/commands/HGETDEL.spec.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ describe('HGETDEL parseCommand', () => {
1818
});
1919

2020

21-
// TODO: enable when new test container is released
22-
describe.skip('HGETDEL call', () => {
21+
describe('HGETDEL call', () => {
2322
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hGetDel empty single field', async client => {
2423
assert.deepEqual(
2524
await client.hGetDel('key', 'filed1'),
@@ -37,7 +36,7 @@ describe.skip('HGETDEL call', () => {
3736
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hGetDel partially populated multiple fields', async client => {
3837
await client.hSet('key', 'field1', 'value1')
3938
assert.deepEqual(
40-
await client.hGetDel('key', ['filed1', 'field2']),
39+
await client.hGetDel('key', ['field1', 'field2']),
4140
['value1', null]
4241
);
4342

Diff for: packages/client/lib/commands/HGETEX.spec.ts

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { strict as assert } from 'node:assert';
2-
import testUtils,{ GLOBAL, sleep } from '../test-utils';
2+
import testUtils,{ GLOBAL } from '../test-utils';
33
import { BasicCommandParser } from '../client/parser';
44
import HGETEX from './HGETEX';
5+
import { setTimeout } from 'timers/promises';
56

67
describe('HGETEX parseCommand', () => {
78
it('hGetEx parseCommand base', () => {
@@ -36,30 +37,28 @@ describe('HGETEX parseCommand', () => {
3637
});
3738

3839

39-
// TODO: enable when new test container is released
40-
describe.skip('HGETEX call', () => {
40+
describe('HGETEX call', () => {
4141
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hGetEx empty single field', async client => {
4242
assert.deepEqual(
43-
await client.hGetEx('key', 'filed1', {expiration: 'PERSIST'}),
43+
await client.hGetEx('key', 'field1', {expiration: 'PERSIST'}),
4444
[null]
4545
);
4646
}, GLOBAL.SERVERS.OPEN);
4747

4848
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hGetEx empty multiple fields', async client => {
4949
assert.deepEqual(
50-
await client.hGetEx('key', ['filed1', 'field2'], {expiration: 'PERSIST'}),
50+
await client.hGetEx('key', ['field1', 'field2'], {expiration: 'PERSIST'}),
5151
[null, null]
5252
);
5353
}, GLOBAL.SERVERS.OPEN);
5454

5555
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hGetEx set expiry', async client => {
5656
await client.hSet('key', 'field', 'value')
5757
assert.deepEqual(
58-
await client.hGetEx('key', 'field', {expiration: {type: 'PX', value: 500}}),
58+
await client.hGetEx('key', 'field', {expiration: {type: 'PX', value: 50}}),
5959
['value']
6060
);
61-
62-
await sleep(600)
61+
await setTimeout(100)
6362
assert.deepEqual(
6463
await client.hGet('key', 'field'),
6564
null
@@ -68,9 +67,9 @@ describe.skip('HGETEX call', () => {
6867

6968
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'gGetEx set expiry PERSIST', async client => {
7069
await client.hSet('key', 'field', 'value')
71-
await client.hGetEx('key', 'field', {expiration: {type: 'PX', value: 500}})
70+
await client.hGetEx('key', 'field', {expiration: {type: 'PX', value: 50}})
7271
await client.hGetEx('key', 'field', {expiration: 'PERSIST'})
73-
await sleep(600)
72+
await setTimeout(100)
7473
assert.deepEqual(
7574
await client.hGet('key', 'field'),
7675
'value'

Diff for: packages/client/lib/commands/HSETEX.spec.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { strict as assert } from 'node:assert';
2-
import testUtils,{ GLOBAL, sleep } from '../test-utils';
2+
import testUtils,{ GLOBAL } from '../test-utils';
33
import { BasicCommandParser } from '../client/parser';
44
import HSETEX from './HSETEX';
55

@@ -68,8 +68,7 @@ describe('HSETEX parseCommand', () => {
6868
});
6969

7070

71-
// TODO: enable when new test container is released
72-
describe.skip('HSETEX call', () => {
71+
describe('HSETEX call', () => {
7372
testUtils.testWithClientIfVersionWithinRange([[8], 'LATEST'], 'hSetEx calls', async client => {
7473
assert.deepEqual(
7574
await client.hSetEx('key_hsetex_call', ['field1', 'value1'], {expiration: {type: "EX", value: 500}, mode: "FNX"}),

Diff for: packages/client/lib/test-utils.ts

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ const utils = TestUtils.createFromConfig({
1313

1414
export default utils;
1515

16-
export const sleep = (delay) => new Promise((resolve: any) => setTimeout((resolve), delay))
17-
1816
const DEBUG_MODE_ARGS = utils.isVersionGreaterThan([7]) ?
1917
['--enable-debug-command', 'yes'] :
2018
[];

0 commit comments

Comments
 (0)