Skip to content

Commit

Permalink
feat: Update: 1. LocalTest methods modifier.
Browse files Browse the repository at this point in the history
Signed-off-by: photowey <[email protected]>
  • Loading branch information
photowey committed Apr 6, 2024
1 parent b0f349a commit c31113f
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@
*/
public abstract class LocalTest {

protected static final String DEFAULT_BOOTSTRAP_SERVERS = Kafka.Bootstrap.Server.DEFAULT_LOCALHOST.value();
protected static final String DEFAULT_HELLO_WORLD_TOPIC = "io.github.photowey.topic.helloworld";
protected static final String DEFAULT_HELLO_WORLD_GROUP = "io.github.photowey.group.helloworld";
public static final String DEFAULT_BOOTSTRAP_SERVERS = Kafka.Bootstrap.Server.DEFAULT_LOCALHOST.value();
public static final String DEFAULT_HELLO_WORLD_TOPIC = "io.github.photowey.topic.helloworld";
public static final String DEFAULT_HELLO_WORLD_GROUP = "io.github.photowey.group.helloworld";

protected KafkaEngine kafkaEngine() {
public KafkaEngine kafkaEngine() {
return KafkaEngineHolder.INSTANCE.kafkaEngine();
}

protected String defaultTopic() {
public String defaultTopic() {
return DEFAULT_HELLO_WORLD_TOPIC;
}

protected String defaultGroup() {
public String defaultGroup() {
return DEFAULT_HELLO_WORLD_GROUP;
}

protected String defaultBoostrapServers() {
public String defaultBoostrapServers() {
return DEFAULT_BOOTSTRAP_SERVERS;
}

protected void testBoostrapServers(Map<String, Object> configs) {
public void testBoostrapServers(Map<String, Object> configs) {
if (null == configs.get(Kafka.Bootstrap.Server.ADDRESS.value())) {
throw new RuntimeException("The bootstrap server address can't be none/empty");
}
}

protected static void sleep(long millis) {
public static void sleep(long millis) {
try {
TimeUnit.MILLISECONDS.sleep(millis);
} catch (InterruptedException e) {
Expand Down

0 comments on commit c31113f

Please sign in to comment.