### 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()返回时机过早导致上述断言失败。
registry.setBad(false);
        for (int i = 0; i < trytimes; i++) {
            System.out.println("failback registry retry ,times:" + i);
            if (latch.getCount() == 0)
                break;
            Thread.sleep(sleeptime);
        }
        assertEquals(0, latch.getCount());
    }
    @Test
    public void testDoRetry_register() throws Exception {
        final AtomicReference<Boolean> notified = new AtomicReference<Boolean>(false);
        final CountDownLatch latch = new CountDownLatch(1);
        NotifyListener listner = new NotifyListener() {
            @Override
            public void notify(List<URL> urls) {
                notified.set(Boolean.TRUE);
            }
        };
        registry = new MockRegistry(registryUrl, latch);
        registry.setBad(true);
        registry.subscribe(serviceUrl.setProtocol(CONSUMER_PROTOCOL).addParameters(CollectionUtils.toStringMap("check", "false")), listner);
        
        assertEquals(false, notified.get());
        assertEquals(1, latch.getCount());
        registry.setBad(false);
        for (int i = 0; i < trytimes; i++) {
            System.out.println("failback registry retry ,times:" + i);
            
            if (latch.getCount() == 0)