This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 261a938 override removeFailedRegisteredTask and
removeFailedSubscribedTask for (#8981)
261a938 is described below
commit 261a938c116f8b58dc47626d50f72757aca4ac18
Author: zrlw <[email protected]>
AuthorDate: Sat Oct 9 15:48:41 2021 +0800
override removeFailedRegisteredTask and removeFailedSubscribedTask for
(#8981)
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 82c6444..76a02df 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();
+ }
+
}
}