private void failoverServiceCntMetricsClear() {
        try {
            for (Map.Entry<String, ServiceInfo> entry : serviceMap.entrySet()) {
                Gauge gauge = Metrics.globalRegistry.find("nacos_naming_client_failover_instances")
                        .tag("service_name", entry.getKey()).gauge();
                if (gauge != null) {
                    Metrics.globalRegistry.remove(gauge);
                }
            }
        } catch (Exception e) {
            NAMING_LOGGER.info("[NA] registerFailoverServiceCnt fail.", e);
        }
    }
@Test
    void testFailoverServiceCntMetricsClear()
            throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {
        Method method = FailoverReactor.class.getDeclaredMethod("failoverServiceCntMetricsClear");
        method.setAccessible(true);
        method.invoke(failoverReactor);
        // No exception
    }