java/e2e-spring/src/main/java/org/apache/rocketmq/utils/MQAdmin.java [212:262]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            for (Entry<String, BrokerData> brokerEntry : brokers.entrySet()) {
                HashMap<Long, String> brokerIps = brokerEntry.getValue().getBrokerAddrs();
                for (Entry<Long, String> brokerIdEntry : brokerIps.entrySet()) {
                    if (brokerIdEntry.getValue().contains(ip)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

    public static void deleteTopic(String nameSrvAddr, String cluster, String topic) {
        try {
            Set<String> set = new HashSet<>();
            set.add(nameSrvAddr);
            mqAdminExt.deleteTopicInNameServer(set, topic);

            boolean isTopicExist = checkTopicExist(mqAdminExt, topic);
            long startTime = System.currentTimeMillis();
            while (!isTopicExist) {
                isTopicExist = checkTopicExist(mqAdminExt, topic);
                if (System.currentTimeMillis() - startTime < 5 * 1000) {
                    TestUtils.waitForMoment(100);
                } else {
                    log.error(String.format("timeout,but delete topic[%s] failed!", topic));
                    break;
                }
            }

        } catch (Exception e) {
        }
    }

    public void getSubConnection(String nameSrvAddr, String clusterName, String consumerId) {
        SubscriptionGroupConfig config = new SubscriptionGroupConfig();
        config.setGroupName(consumerId);
        try {
            Set<String> masterSet = CommandUtil.fetchMasterAddrByClusterName(mqAdminExt, clusterName);
            for (String addr : masterSet) {
                try {

                    System.out.printf("create subscription group %s to %s success.\n", consumerId, addr);
                } catch (Exception e) {
                    e.printStackTrace();
                    Thread.sleep(1000 * 1);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/e2e-v4/src/main/java/org/apache/rocketmq/utils/MQAdmin.java [127:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            for (Entry<String, BrokerData> brokerEntry : brokers.entrySet()) {
                HashMap<Long, String> brokerIps = brokerEntry.getValue().getBrokerAddrs();
                for (Entry<Long, String> brokerIdEntry : brokerIps.entrySet()) {
                    if (brokerIdEntry.getValue().contains(ip)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

    public static void deleteTopic(String nameSrvAddr, String cluster, String topic) {
        try {
            Set<String> set = new HashSet<>();
            set.add(nameSrvAddr);
            mqAdminExt.deleteTopicInNameServer(set, topic);

            boolean isTopicExist = checkTopicExist(mqAdminExt, topic);
            long startTime = System.currentTimeMillis();
            while (!isTopicExist) {
                isTopicExist = checkTopicExist(mqAdminExt, topic);
                if (System.currentTimeMillis() - startTime < 5 * 1000) {
                    TestUtils.waitForMoment(100);
                } else {
                    log.error(String.format("timeout,but delete topic[%s] failed!", topic));
                    break;
                }
            }

        } catch (Exception e) {
        }
    }

    public void getSubConnection(String nameSrvAddr, String clusterName, String consumerId) {
        SubscriptionGroupConfig config = new SubscriptionGroupConfig();
        config.setGroupName(consumerId);
        try {
            Set<String> masterSet = CommandUtil.fetchMasterAddrByClusterName(mqAdminExt, clusterName);
            for (String addr : masterSet) {
                try {

                    System.out.printf("create subscription group %s to %s success.\n", consumerId, addr);
                } catch (Exception e) {
                    e.printStackTrace();
                    Thread.sleep(1000 * 1);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



