### 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()返回时机过早导致上述断言失败。
CountDownLatch latch;
        private boolean bad = false;
        /**
         * @param url
         */
        public MockRegistry(URL url, CountDownLatch latch) {
            super(url);
            this.latch = latch;
        }
        /**
         * @param bad the bad to set
         */
        public void setBad(boolean bad) {
            this.bad = bad;
        }
        @Override
        public void doRegister(URL url) {
            if (bad) {
                throw new RuntimeException("can not invoke!");
            }
            
            latch.countDown();
        }
        @Override
        public void doUnregister(URL url) {