### Environment

* Dubbo version:  3.0  / master
3.0 github日志：
```
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.apache.dubbo.registry.support.FailbackRegistryTest.testRecover(FailbackRegistryTest.java:173)
```
173行代码为：```Assertions.assertEquals(0, mockRegistry.getFailedRegistered().size());```

原因：FailedRegisteredTask和FailedSubscribedTask的doRetry都是先执行doRegister或doSubscribe，再删掉failed task；但MockRegistry在doRegister和doSubscribe就做了latch.countDown()，所以latch.await()返回时机过早导致上述断言失败。
if (bad) {
                throw new RuntimeException("can not invoke!");
            }
            
            latch.countDown();
        }
        @Override
        public void doSubscribe(URL url, NotifyListener listener) {
            if (bad) {
                throw new RuntimeException("can not invoke!");
            }
            
            super.notify(url, listener, Arrays.asList(new URL[]{serviceUrl}));
            latch.countDown();
        }
        @Override
        public void doUnsubscribe(URL url, NotifyListener listener) {
            if (bad) {
                throw new RuntimeException("can not invoke!");
            }
            
            latch.countDown();
        }
        @Override
        public boolean isAvailable() {
            return true;
        }
    }
}