You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/10/09 07:49:08 UTC

[dubbo] branch master updated: override removeFailedRegisteredTask and removeFailedSubscribedTask for (#8982)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a88e6bf  override removeFailedRegisteredTask and removeFailedSubscribedTask for (#8982)
a88e6bf is described below

commit a88e6bfc790f2039dd3bcb7f3ca3e193af429e69
Author: zrlw <zr...@sina.com>
AuthorDate: Sat Oct 9 15:48:56 2021 +0800

    override removeFailedRegisteredTask and removeFailedSubscribedTask for (#8982)
    
    testRecover
---
 .../dubbo/registry/support/FailbackRegistryTest.java | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/support/FailbackRegistryTest.java b/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/support/FailbackRegistryTest.java
index 94c44a0..e63a4da 100644
--- a/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/support/FailbackRegistryTest.java
+++ b/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/support/FailbackRegistryTest.java
@@ -154,7 +154,7 @@ public class FailbackRegistryTest {
 
     @Test
     public void testRecover() throws Exception {
-        CountDownLatch countDownLatch = new CountDownLatch(4);
+        CountDownLatch countDownLatch = new CountDownLatch(6);
         final AtomicReference<Boolean> notified = new AtomicReference<Boolean>(false);
         NotifyListener listener = new NotifyListener() {
             @Override
@@ -239,5 +239,23 @@ public class FailbackRegistryTest {
             return true;
         }
 
+        @Override
+        public void removeFailedRegisteredTask(URL url) {
+            if (bad) {
+                throw new RuntimeException("can not invoke!");
+            }
+            super.removeFailedRegisteredTask(url);
+            latch.countDown();
+        }
+
+        @Override
+        public void removeFailedSubscribedTask(URL url, NotifyListener listener) {
+            if (bad) {
+                throw new RuntimeException("can not invoke!");
+            }
+            super.removeFailedSubscribedTask(url, listener);
+            latch.countDown();
+        }
+
     }
 }