aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

reactor java client #108

Closed kptfh closed 6 years ago

kptfh commented 6 years ago

Java client that introduce Reactive streams interface to Aerospike

BrianNichols commented 6 years ago

I liked that you created this reactor client in a separate library. We are debating whether to include this library in the aerospike-client-java repo or in a separate util repo. It will take some time to digest this pull request.

Also, can you answer the questions posed on this pull request?

BrianNichols commented 6 years ago

@kptfh : Can you fix the unit tests?

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.aerospike.client.reactor.DeleteReactorTest
[DEBUG] (main) Using Console logging
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.872 sec
Running com.aerospike.client.reactor.OperateReactorTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.21 sec
Running com.aerospike.client.reactor.PutGetReactorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.121 sec
Running com.aerospike.client.reactor.BatchReactorTest
[DEBUG] (event0) onNextDropped: test:test:batchkeyabsent2:f88a349d509c2cbff9ffb85e01faf10570b1cc59:false
[DEBUG] (event0) onNextDropped: test:test:batchkeyabsent2:f88a349d509c2cbff9ffb85e01faf10570b1cc59:
[DEBUG] (nioEventLoopGroup-14-1) onNextDropped: test:test:batchkeyabsent2:f88a349d509c2cbff9ffb85e01faf10570b1cc59:false
[DEBUG] (nioEventLoopGroup-17-1) onNextDropped: test:test:batchkeyabsent2:f88a349d509c2cbff9ffb85e01faf10570b1cc59:
Tests run: 18, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.463 sec <<< FAILURE!
Running com.aerospike.client.reactor.ScanReactorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.377 sec
Running com.aerospike.client.reactor.UdfReactorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.054 sec
Running com.aerospike.client.reactor.QueryReactorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.128 sec

Results :

Failed tests:   batchNotExistsSequence[eventLoopType=DIRECT_NIO](com.aerospike.client.reactor.BatchReactorTest): expectation "expectComplete" failed (expected: onComplete(); actual: onNext(test:test:batchkeyabsent1:35aec001f79857dde3099179ba8f765591081778:false))
  batchGetNothingSequence[eventLoopType=DIRECT_NIO](com.aerospike.client.reactor.BatchReactorTest): expectation "expectComplete" failed (expected: onComplete(); actual: onNext(test:test:batchkeyabsent1:35aec001f79857dde3099179ba8f765591081778:))
  batchNotExistsSequence[eventLoopType=NETTY_NIO](com.aerospike.client.reactor.BatchReactorTest): expectation "expectComplete" failed (expected: onComplete(); actual: onNext(test:test:batchkeyabsent1:35aec001f79857dde3099179ba8f765591081778:false))
  batchGetNothingSequence[eventLoopType=NETTY_NIO](com.aerospike.client.reactor.BatchReactorTest): expectation "expectComplete" failed (expected: onComplete(); actual: onNext(test:test:batchkeyabsent1:35aec001f79857dde3099179ba8f765591081778:))

Tests run: 38, Failures: 4, Errors: 0, Skipped: 0
kptfh commented 6 years ago

fixed

BrianNichols commented 6 years ago

@kptfh: I noticed that reactor tests do not have a way to accept command line arguments like the regular client tests do. Was that intentional?

How do I change the host (from localhost) when running reactor tests on a machine that is different from the server?

BrianNichols commented 6 years ago

This pull request has been accepted with minor modifications:

1) reactor-client was moved to the new extensions directory. This directory will eventually contain other libraries that extend AerospikeClient functionality. Extensions are optional and are compiled separately.

2) A command line unit test interface was added to reactor-client. The arguments are the same as the regular client's unit test arguments.

3) README files were slightly modified.

4) Added copyright message when needed.

We haven't performed a new release, but the public github repo has been updated with these changes.