Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.

Commit ae03944

Browse files
authored
Fixing rebloom tdigest tests (#225)
1 parent 10945c0 commit ae03944

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
inputs:
55
tests:
6-
description: "What tests to run. Available options: rejson, rts, redisearch, redisgraph, redisgears, redisbloom, rebloom-topk, rebloom-cmk, rebloom-cuckoo, redis-ai, ris. Use 'All' to run all tests."
6+
description: "What tests to run. Available options: rejson, rts, redisearch, redisgraph, redisgears, redisbloom, rebloom-topk, rebloom-cmk, rebloom-cuckoo, rebloom-tdigest, redis-ai, ris. Use 'All' to run all tests."
77
required: true
88
default: 'All'
99
pull_request:

tests/redisbloom-tdigest.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,24 @@ describe('RedisBloom TDigest filter testing', async function() {
4444
});
4545
it('min function', async () => {
4646
const response = await redis.bloom_tdigest_module_min(key1);
47-
expect(response).to.eql('1500', 'The response of \'TDIGEST.MIN\' command')
47+
expect(response).to.eql('1', 'The response of \'TDIGEST.MIN\' command')
4848
});
4949
it('quantile function', async () => {
5050
const response = await redis.bloom_tdigest_module_quantile(key1, 0.5);
5151
expect(response[0]).to.eql('1500', 'The response of \'TDIGEST.QUANTILE\' command')
5252
});
5353
it('cdf function', async () => {
5454
const response = await redis.bloom_tdigest_module_cdf(key1, 10);
55-
expect(response[0]).to.eql('0', 'The response of \'TDIGEST.CDF\' command')
55+
expect(response[0]).to.eql('0.5', 'The response of \'TDIGEST.CDF\' command')
5656
});
5757
it('info function', async () => {
5858
const response = await redis.bloom_tdigest_module_info(key1);
5959
expect(response.Compression).to.eql(100, 'The compression')
6060
expect(response.Capacity).to.eql(610, 'The capacity')
61-
expect(response['Merged nodes']).to.eql(1, 'The merged nodes')
61+
expect(response['Merged nodes']).to.eql(2, 'The merged nodes')
6262
expect(response['Unmerged nodes']).to.eql(0, 'The unmerged nodes')
63-
expect(response['Merged weight']).to.eql('1', 'The merged weight')
64-
expect(response['Unmerged weight']).to.eql('0', 'The unmerged weight')
63+
expect(response['Merged weight']).to.eql(2, 'The merged weight')
64+
expect(response['Unmerged weight']).to.eql(0, 'The unmerged weight')
6565
expect(response['Total compressions']).to.eql(1, 'The total compressions')
6666
});
6767
});

0 commit comments

Comments
 (0)