You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Update Redis version to 8.0.1-pre (#2952)
> FT.AGGREGATE returns an array reply where each row is an array reply and represents a single aggregate result. > The integer reply at position 1 does not represent a valid value. We now calculate the result length bazed on the number of results instead of the integer reply at pos 1
This commit is contained in:
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@@ -7,22 +7,22 @@ on:
|
|||||||
- v4.0
|
- v4.0
|
||||||
- v5
|
- v5
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**/*.md'
|
- "**/*.md"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- v4.0
|
- v4.0
|
||||||
- v5
|
- v5
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**/*.md'
|
- "**/*.md"
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [ '18', '20', '22' ]
|
node-version: ["18", "20", "22"]
|
||||||
redis-version: [ 'rs-7.2.0-v13', 'rs-7.4.0-v1', '8.0-RC2-pre' ]
|
redis-version: ["rs-7.2.0-v13", "rs-7.4.0-v1", "8.0.1-pre"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@@ -156,7 +156,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
total: Number(rawReply[0]),
|
total: results.length,
|
||||||
results
|
results
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@@ -73,7 +73,7 @@ describe('PROFILE AGGREGATE', () => {
|
|||||||
const normalizeObject = obj => JSON.parse(JSON.stringify(obj));
|
const normalizeObject = obj => JSON.parse(JSON.stringify(obj));
|
||||||
const res = await client.ft.profileAggregate('index', '*');
|
const res = await client.ft.profileAggregate('index', '*');
|
||||||
const normalizedRes = normalizeObject(res);
|
const normalizedRes = normalizeObject(res);
|
||||||
assert.equal(normalizedRes.results.total, 1);
|
assert.equal(normalizedRes.results.total, 2);
|
||||||
|
|
||||||
assert.ok(Array.isArray(normalizedRes.profile));
|
assert.ok(Array.isArray(normalizedRes.profile));
|
||||||
assert.equal(normalizedRes.profile[0][0], 'Total profile time');
|
assert.equal(normalizedRes.profile[0][0], 'Total profile time');
|
||||||
|
Reference in New Issue
Block a user