AMashenkov commented on code in PR #1590:
URL: https://github.com/apache/ignite-3/pull/1590#discussion_r1093217561
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/util/CompositeSubscriptionTest.java:
##########
@@ -157,28 +157,27 @@ private void doPublishSubscribe(
lsnr.reset(requested);
- CompletableFuture.runAsync(() -> compPublisher.subscribe(new
Subscriber<>() {
- @Override
- public void onSubscribe(Subscription subscription) {
- subscriptionRef.set(subscription);
- }
-
- @Override
- public void onNext(Integer item) {
- lsnr.onNext(item);
- }
-
- @Override
- public void onError(Throwable t) {
- assert false;
- }
-
- @Override
- public void onComplete() {
- lsnr.onComplete();
- }
- })
- ).join();
+ compPublisher.subscribe(new Subscriber<>() {
Review Comment:
I think all the guaranties are preserved.
Test thread would continue work (exit from join()) right after subscribe()
method had been finished in background thread.
Now, test thread just continue after exiting from subscribe() method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]