Java Code Examples for org.apache.rocketmq.test.util.MQRandomUtils

The following examples show how to use org.apache.rocketmq.test.util.MQRandomUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: rocketmq   Source File: BaseConf.java    License: Apache License 2.0 6 votes vote down vote up
public static String initTopic() {
    long startTime = System.currentTimeMillis();
    String topic = MQRandomUtils.getRandomTopic();
    boolean createResult = false;
    while (true) {
        createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, 8);
        if (createResult) {
            break;
        } else if (System.currentTimeMillis() - startTime > topicCreateTime) {
            Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic,
                System.currentTimeMillis() - startTime));
            break;
        } else {
            TestUtils.waitForMonment(500);
            continue;
        }
    }

    return topic;
}
 
Example 2
Source Project: rocketmq_trans_message   Source File: BaseConf.java    License: Apache License 2.0 6 votes vote down vote up
public static String initTopic() {
    long startTime = System.currentTimeMillis();
    String topic = MQRandomUtils.getRandomTopic();
    boolean createResult = false;
    while (true) {
        createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, 8);
        if (createResult) {
            break;
        } else if (System.currentTimeMillis() - startTime > topicCreateTime) {
            Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic,
                System.currentTimeMillis() - startTime));
            break;
        } else {
            TestUtils.waitForMonment(500);
            continue;
        }
    }

    return topic;
}
 
Example 3
Source Project: DDMQ   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 4
Source Project: DDMQ   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 5
Source Project: rocketmq-4.3.0   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 6
Source Project: rocketmq-4.3.0   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 7
Source Project: rocketmq-read   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 8
Source Project: rocketmq-read   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 9
Source Project: rocketmq   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 10
Source Project: DDMQ   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 11
Source Project: DDMQ   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 12
Source Project: rocketmq-all-4.1.0-incubating   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 13
Source Project: rocketmq-all-4.1.0-incubating   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 14
Source Project: rocketmq_trans_message   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}
 
Example 15
Source Project: rocketmq   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initTopic() {
    String topic = MQRandomUtils.getRandomTopic();
    IntegrationTestBase.initTopic(topic, nsAddr, clusterName);

    return topic;
}
 
Example 16
Source Project: rocketmq   Source File: BaseConf.java    License: Apache License 2.0 4 votes vote down vote up
public static String initConsumerGroup() {
    String group = MQRandomUtils.getRandomConsumerGroup();
    return initConsumerGroup(group);
}