Skip to content

Commit

Permalink
Fix missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mbobowski committed Oct 29, 2024
1 parent b5503f7 commit a04aa35
Showing 1 changed file with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
package com.snowflake.kafka.connector;

import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.BUFFER_COUNT_RECORDS;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.BUFFER_SIZE_BYTES;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.ERRORS_LOG_ENABLE_CONFIG;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.ERRORS_TOLERANCE_CONFIG;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.JVM_PROXY_HOST;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.JVM_PROXY_PORT;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.NAME;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWFLAKE_DATABASE;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWFLAKE_PRIVATE_KEY;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWFLAKE_SCHEMA;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWFLAKE_URL;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWFLAKE_USER;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWPIPE_STREAMING_MAX_CLIENT_LAG;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.SNOWPIPE_STREAMING_MAX_MEMORY_LIMIT_IN_BYTES;
import static com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig.*;
import static com.snowflake.kafka.connector.Utils.HTTP_NON_PROXY_HOSTS;
import static com.snowflake.kafka.connector.internal.TestUtils.getConfig;
import static org.assertj.core.api.Assertions.*;
Expand Down Expand Up @@ -187,16 +174,16 @@ public void testNonProxyHosts() {
@Test
public void testIllegalTopicMap() {
Map<String, String> config = getConfig();
config.put(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP, "$@#$#@%^$12312");
config.put(TOPICS_TABLES_MAP, "$@#$#@%^$12312");
assertThatThrownBy(() -> connectorConfigValidator.validateConfig(config))
.isInstanceOf(SnowflakeKafkaConnectorException.class)
.hasMessageContaining(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP);
.hasMessageContaining(TOPICS_TABLES_MAP);
}

@Test
public void testIllegalTableName() {
Map<String, String> config = getConfig();
config.put(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP, "topic1:!@#@!#!@");
config.put(TOPICS_TABLES_MAP, "topic1:!@#@!#!@");
assertThatThrownBy(() -> connectorConfigValidator.validateConfig(config))
.isInstanceOf(SnowflakeKafkaConnectorException.class)
.matches(
Expand All @@ -209,7 +196,7 @@ public void testIllegalTableName() {
@Test
public void testDuplicatedTopic() {
Map<String, String> config = getConfig();
config.put(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP, "topic1:table1,topic1:table2");
config.put(TOPICS_TABLES_MAP, "topic1:table1,topic1:table2");
assertThatThrownBy(() -> connectorConfigValidator.validateConfig(config))
.isInstanceOf(SnowflakeKafkaConnectorException.class)
.matches(
Expand All @@ -222,15 +209,15 @@ public void testDuplicatedTopic() {
@Test
public void testDuplicatedTableName() {
Map<String, String> config = getConfig();
config.put(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP, "topic1:table1,topic2:table1");
config.put(TOPICS_TABLES_MAP, "topic1:table1,topic2:table1");
connectorConfigValidator.validateConfig(config);
}

@Test
public void testNameMapCovered() {
Map<String, String> config = getConfig();
config.put(SnowflakeSinkConnectorConfig.TOPICS, "!@#,$%^,test");
config.put(SnowflakeSinkConnectorConfig.TOPICS_TABLES_MAP, "!@#:table1,$%^:table2");
config.put(TOPICS_TABLES_MAP, "!@#:table1,$%^:table2");
connectorConfigValidator.validateConfig(config);
}

Expand Down

0 comments on commit a04aa35

Please sign in to comment.