### 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()返回时机过早导致上述断言失败。
break;
            Thread.sleep(sleeptime);
        }
        assertEquals(0, latch.getCount());
        
        assertEquals(true, notified.get());
    }
    @Test
    public void testRecover() throws Exception {
        CountDownLatch countDownLatch = new CountDownLatch(4);
        final AtomicReference<Boolean> notified = new AtomicReference<Boolean>(false);
        NotifyListener listener = new NotifyListener() {
            @Override
            public void notify(List<URL> urls) {
                notified.set(Boolean.TRUE);
            }
        };
        MockRegistry mockRegistry = new MockRegistry(registryUrl, countDownLatch);
        mockRegistry.register(serviceUrl);
        mockRegistry.subscribe(serviceUrl, listener);
        Assertions.assertEquals(1, mockRegistry.getRegistered().size());
        Assertions.assertEquals(1, mockRegistry.getSubscribed().size());
        mockRegistry.recover();
        countDownLatch.await();
        Assertions.assertEquals(0, mockRegistry.getFailedRegistered().size());
        FailbackRegistry.Holder h = new FailbackRegistry.Holder(registryUrl, listener);
        Assertions.assertNull(mockRegistry.getFailedSubscribed().get(h));
        Assertions.assertEquals(countDownLatch.getCount(), 0);
    }
    private static class MockRegistry extends FailbackRegistry {