hazelcast-nodejs-client icon indicating copy to clipboard operation
hazelcast-nodejs-client copied to clipboard

Add filter argument to Ringbuffer interface [API-1294]

Open fatihozer0 opened this issue 3 years ago • 6 comments

I am not sure if anything is right but can not say why it is wrong. I tried this on some other codes to try if it works and worked but not sure.

fatihozer0 avatar Oct 08 '22 13:10 fatihozer0

Codecov Report

Merging #1393 (dbd6ab5) into 5.1.x (baa1fa9) will decrease coverage by 0.34%. The diff coverage is n/a.

@@            Coverage Diff             @@
##            5.1.x    #1393      +/-   ##
==========================================
- Coverage   92.12%   91.77%   -0.35%     
==========================================
  Files         463      463              
  Lines       16347    16346       -1     
  Branches     1329     1329              
==========================================
- Hits        15060    15002      -58     
- Misses        897      950      +53     
- Partials      390      394       +4     
Impacted Files Coverage Δ
src/codec/ClientAuthenticationCustomCodec.ts 42.22% <0.00%> (-33.34%) :arrow_down:
src/network/ConnectionManager.ts 75.35% <0.00%> (-8.46%) :arrow_down:
src/invocation/InvocationService.ts 94.11% <0.00%> (-1.18%) :arrow_down:
src/config/ConfigBuilder.ts 89.67% <0.00%> (-1.01%) :arrow_down:
src/invocation/ClusterService.ts 94.01% <0.00%> (-0.86%) :arrow_down:
src/core/HazelcastError.ts 77.27% <0.00%> (-0.76%) :arrow_down:
src/protocol/ErrorFactory.ts 64.66% <0.00%> (-0.76%) :arrow_down:
src/HazelcastClient.ts 93.37% <0.00%> (-0.04%) :arrow_down:
src/util/Util.ts 87.89% <0.00%> (ø)
src/proxy/NearCachedMapProxy.ts 94.32% <0.00%> (+1.41%) :arrow_up:
... and 1 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 08 '22 13:10 codecov[bot]

I am not sure if anything is right but can not say why it is wrong.

😄 What?

Looks good, thanks

srknzl avatar Oct 13 '22 16:10 srknzl

Adding a test may not be possible because server side code is needed. I don't know if we have a filter in the test jar. A code sample requires users to write java code in the server side. Not good.

You are right about the documentation. API documentation can be added. Also there can be a small section about the filter in section https://github.com/hazelcast/hazelcast-nodejs-client/blob/master/DOCUMENTATION.md#847-using-ringbuffer

srknzl avatar Oct 13 '22 23:10 srknzl

@srknzl The python client has two tests which uses the filter: https://github.com/hazelcast/hazelcast-python-client/blob/b8dd0d737ef976922311a8241e2a51b50e7ab3fa/tests/integration/backward_compatible/proxy/ringbuffer_test.py#L230 Could you guys check them out to see whether they can be ported to the Node.js client?

yuce avatar Oct 14 '22 06:10 yuce

We can do and we should. It is in the test jar.

https://github.com/hazelcast/hazelcast/blob/14ef0dbefa4a6fa00a50a8873aeea02ec6c3f5e4/hazelcast/src/test/java/com/hazelcast/client/test/PrefixFilter.java#L26

srknzl avatar Oct 14 '22 09:10 srknzl

Added a test which is not ported. I checked the links you shared. Gonna add documentations now

fatihozer0 avatar Oct 14 '22 12:10 fatihozer0

Continues on #1413

fatihozer0 avatar Nov 05 '22 13:11 fatihozer0