You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by ea...@apache.org on 2022/09/19 03:09:21 UTC

[dubbo-samples] branch master updated: add sleep(1000) before cancel (#522)

This is an automated email from the ASF dual-hosted git repository.

earthchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new 18cbdcdd add sleep(1000) before cancel (#522)
18cbdcdd is described below

commit 18cbdcdd96979d82911c921796813433ca9f91d4
Author: 一个不知名的Java靓仔 <cl...@gmail.com>
AuthorDate: Mon Sep 19 11:09:15 2022 +0800

    add sleep(1000) before cancel (#522)
---
 .../src/test/java/org/apache/dubbo/sample/tri/BaseClientTest.java       | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dubbo-samples-triple/src/test/java/org/apache/dubbo/sample/tri/BaseClientTest.java b/dubbo-samples-triple/src/test/java/org/apache/dubbo/sample/tri/BaseClientTest.java
index b4256738..d07de9b9 100644
--- a/dubbo-samples-triple/src/test/java/org/apache/dubbo/sample/tri/BaseClientTest.java
+++ b/dubbo-samples-triple/src/test/java/org/apache/dubbo/sample/tri/BaseClientTest.java
@@ -112,6 +112,7 @@ public abstract class BaseClientTest {
         CancelableStreamObserver<GreeterRequest> streamObserver =
                 (CancelableStreamObserver<GreeterRequest>) requestObserver;
         streamObserver.onNext(request);
+        Thread.sleep(1000);
         streamObserver.cancel(new RuntimeException());
         streamObserver.onCompleted();
         Thread.sleep(2000);
@@ -153,6 +154,7 @@ public abstract class BaseClientTest {
         for (int i = 0; i < n; i++) {
             streamObserver.onNext(request);
         }
+        Thread.sleep(1000);
         streamObserver.cancel(null);
         // streamObserver.onCompleted();
         Thread.sleep(2000);


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org