blob: 629c07df69cf06eb4e12362b7e527f92af9d7402 [file] [log] [blame]
package geode.kafka.source;
import geode.kafka.GeodeConnectorConfig;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import static geode.kafka.GeodeConnectorConfig.LOCATORS;
import static geode.kafka.GeodeConnectorConfig.TASK_ID;
import static geode.kafka.source.GeodeSourceConnectorConfig.DURABLE_CLIENT_ID_PREFIX;
import static org.junit.Assert.assertEquals;
public class GeodeSourceConnectorConfigTest {
@Test
public void durableClientIdShouldNotBeSetIfPrefixIsEmpty() {
Map<String, String> props = new HashMap<>();
props.put(TASK_ID, "0");
props.put(DURABLE_CLIENT_ID_PREFIX, "");
props.put(LOCATORS, "localhost[10334]");
GeodeSourceConnectorConfig config = new GeodeSourceConnectorConfig(props);
assertEquals("", config.getDurableClientId());
}
}