Skip to content

Commit 21e9aac

Browse files
committed
updated validators
1 parent e3f0ce8 commit 21e9aac

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

s3-commons/src/main/java/io/aiven/kafka/connect/config/s3/S3ConfigFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.util.Objects;
2525
import java.util.stream.Collectors;
2626

27-
import io.aiven.kafka.connect.common.config.validators.TimeScaleValidator;
2827
import org.apache.kafka.common.config.ConfigDef;
2928
import org.apache.kafka.common.config.ConfigException;
3029
import org.apache.kafka.common.config.ConfigValue;
@@ -40,6 +39,7 @@
4039
import io.aiven.kafka.connect.common.config.TimestampSource;
4140
import io.aiven.kafka.connect.common.config.validators.NonEmptyPassword;
4241
import io.aiven.kafka.connect.common.config.validators.ScaleValidator;
42+
import io.aiven.kafka.connect.common.config.validators.TimeScaleValidator;
4343
import io.aiven.kafka.connect.common.config.validators.TimeZoneValidator;
4444
import io.aiven.kafka.connect.common.config.validators.TimestampSourceValidator;
4545
import io.aiven.kafka.connect.common.config.validators.UrlValidator;

s3-sink-connector/src/test/java/io/aiven/kafka/connect/s3/config/S3SinkConfigTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,16 @@ void wrongAwsS3BackoffPolicy() {
435435
S3ConfigFragment.AWS_S3_BUCKET_NAME_CONFIG, "blah-blah-blah",
436436
S3ConfigFragment.AWS_S3_RETRY_BACKOFF_DELAY_MS_CONFIG, "0");
437437
assertThatThrownBy(() -> new S3SinkConfig(wrongDelayProps)).isInstanceOf(ConfigException.class)
438-
.hasMessage("Invalid value 0 for configuration aws.s3.backoff.delay.ms: Value must be at least 1");
438+
.hasMessage(
439+
"Invalid value 0 for configuration aws.s3.backoff.delay.ms: Value must be at least 1 Milliseconds");
439440

440441
final var wrongMaxDelayProps = Map.of(S3ConfigFragment.AWS_ACCESS_KEY_ID_CONFIG, "blah-blah-blah",
441442
S3ConfigFragment.AWS_SECRET_ACCESS_KEY_CONFIG, "blah-blah-blah",
442443
S3ConfigFragment.AWS_S3_BUCKET_NAME_CONFIG, "blah-blah-blah",
443444
S3ConfigFragment.AWS_S3_RETRY_BACKOFF_MAX_DELAY_MS_CONFIG, "0");
444445
assertThatThrownBy(() -> new S3SinkConfig(wrongMaxDelayProps)).isInstanceOf(ConfigException.class)
445-
.hasMessage("Invalid value 0 for configuration aws.s3.backoff.max.delay.ms: Value must be at least 1");
446+
.hasMessage(
447+
"Invalid value 0 for configuration aws.s3.backoff.max.delay.ms: Value must be at least 1 Milliseconds");
446448

447449
final var wrongMaxRetriesProps = Map.of(S3ConfigFragment.AWS_ACCESS_KEY_ID_CONFIG, "blah-blah-blah",
448450
S3ConfigFragment.AWS_SECRET_ACCESS_KEY_CONFIG, "blah-blah-blah",

0 commit comments

Comments
 (0)