Skip to content

Commit

Permalink
fixup! 5252f71
Browse files Browse the repository at this point in the history
  • Loading branch information
amuraru committed Jun 24, 2023
1 parent fb9571f commit 069949c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id "com.jfrog.artifactory"
id "idea"
id "jacoco" // Java Code Coverage plugin
id "com.github.ben-manes.versions" version "0.46.0"
id "com.github.ben-manes.versions" version "0.47.0"
id "com.github.spotbugs" version "5.0.14" apply false
id "checkstyle"
id "org.openapi.generator" version "5.4.0"
Expand Down Expand Up @@ -280,8 +280,7 @@ project(':cruise-control') {
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}"
api "org.apache.kafka:kafka_$scalaBinaryVersion:$kafkaVersion"
api "org.apache.kafka:kafka-clients:$kafkaVersion"
// Add following dependency when upgrading to Kafka 3.5
//api "org.apache.kafka:kafka-storage:$kafkaVersion"
api "org.apache.kafka:kafka-storage:$kafkaVersion"
implementation "org.scala-lang:scala-library:$scalaVersion"
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
Expand All @@ -293,9 +292,9 @@ project(':cruise-control') {
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.1.13'
implementation 'io.github.classgraph:classgraph:4.8.158'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'com.google.guava:guava:32.0.1-jre'
// Temporary pin for vulnerability
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
api "io.vertx:vertx-web-openapi:${vertxVersion}"
api "io.vertx:vertx-core:${vertxVersion}"
api "io.vertx:vertx-web:${vertxVersion}"
Expand All @@ -312,13 +311,14 @@ project(':cruise-control') {
testImplementation 'org.easymock:easymock:4.3'
testImplementation "org.apache.kafka:kafka_$scalaBinaryVersion:$kafkaVersion:test"
testImplementation "org.apache.kafka:kafka-clients:$kafkaVersion:test"
testImplementation 'commons-io:commons-io:2.11.0'
testImplementation 'commons-io:commons-io:2.13.0'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.14:tests'
testImplementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
testImplementation 'org.apache.kerby:kerb-simplekdc:2.0.3'
testImplementation 'com.jayway.jsonpath:json-path:2.8.0'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-easymock:2.0.9'
testImplementation 'net.minidev:json-smart:2.4.11'
}

publishing {
Expand Down Expand Up @@ -446,15 +446,15 @@ project(':cruise-control-metrics-reporter') {
implementation "org.apache.kafka:kafka-clients:$kafkaVersion"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
// Temporary pin for vulnerability
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-easymock:2.0.9'
testImplementation "org.apache.kafka:kafka-clients:$kafkaVersion:test"
testImplementation "org.apache.kafka:kafka-clients:$kafkaVersion"
testImplementation 'commons-io:commons-io:2.11.0'
testImplementation 'commons-io:commons-io:2.13.0'
testImplementation "org.apache.zookeeper:zookeeper:${zookeeperVersion}"
testOutput sourceSets.test.output
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.kafka.common.KafkaFuture;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.config.ConfigResource;
import org.apache.kafka.common.config.TopicConfig;
import org.apache.kafka.common.protocol.Errors;
import org.apache.kafka.common.requests.DescribeLogDirsResponse;
import org.apache.kafka.common.utils.MockTime;
Expand All @@ -63,7 +64,6 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static kafka.log.LogConfig.CleanupPolicyProp;


/**
Expand Down Expand Up @@ -566,7 +566,7 @@ private TestContext prepareContext(int numWindowToPreserve, boolean isClusterJBO
props.put(MonitorConfig.MIN_SAMPLES_PER_PARTITION_METRICS_WINDOW_CONFIG,
Integer.toString(MIN_SAMPLES_PER_WINDOW));
props.put(MonitorConfig.PARTITION_METRICS_WINDOW_MS_CONFIG, Long.toString(WINDOW_MS));
props.put(CleanupPolicyProp(), DEFAULT_CLEANUP_POLICY);
props.put(TopicConfig.CLEANUP_POLICY_CONFIG, DEFAULT_CLEANUP_POLICY);
props.put(MonitorConfig.SAMPLE_STORE_CLASS_CONFIG, NoopSampleStore.class.getName());
props.put(MonitorConfig.SAMPLE_PARTITION_METRIC_STORE_ON_EXECUTION_CLASS_CONFIG, NoopSampleStore.class.getName());
props.put(ExecutorConfig.ZOOKEEPER_SECURITY_ENABLED_CONFIG, "false");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.kafka.common.Node;
import org.apache.kafka.common.TopicPartitionInfo;
import org.apache.kafka.common.config.ConfigResource;
import org.apache.kafka.common.config.TopicConfig;
import org.easymock.EasyMock;
import org.junit.Test;

Expand All @@ -34,8 +35,6 @@
import static com.linkedin.kafka.cruisecontrol.KafkaCruiseControlUtils.maybeIncreasePartitionCount;
import static com.linkedin.kafka.cruisecontrol.KafkaCruiseControlUtils.maybeUpdateTopicConfig;
import static com.linkedin.kafka.cruisecontrol.KafkaCruiseControlUtils.wrapTopic;
import static kafka.log.LogConfig.CleanupPolicyProp;
import static kafka.log.LogConfig.RetentionMsProp;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

Expand All @@ -60,7 +59,7 @@ public void testMaybeUpdateTopicConfig() throws InterruptedException, ExecutionE
Config topicConfig = EasyMock.createMock(Config.class);
AlterConfigsResult alterConfigsResult = EasyMock.createMock(AlterConfigsResult.class);
Set<AlterConfigOp> alterConfigOps = Collections.singleton(new AlterConfigOp(
new ConfigEntry(RetentionMsProp(), Long.toString(MOCK_DESIRED_RETENTION_MS)), AlterConfigOp.OpType.SET));
new ConfigEntry(TopicConfig.RETENTION_MS_CONFIG, Long.toString(MOCK_DESIRED_RETENTION_MS)), AlterConfigOp.OpType.SET));
Map<ConfigResource, KafkaFuture<Config>> describeConfigsValues = Collections.singletonMap(MOCK_TOPIC_RESOURCE,
describedConfigsFuture);
Map<ConfigResource, KafkaFuture<Void>> alterConfigsValues = Collections.singletonMap(MOCK_TOPIC_RESOURCE,
Expand All @@ -70,9 +69,9 @@ public void testMaybeUpdateTopicConfig() throws InterruptedException, ExecutionE
EasyMock.expect(adminClient.describeConfigs(EasyMock.eq(Collections.singleton(MOCK_TOPIC_RESOURCE)))).andReturn(describeConfigsResult);
EasyMock.expect(describeConfigsResult.values()).andReturn(describeConfigsValues);
EasyMock.expect(describedConfigsFuture.get(CLIENT_REQUEST_TIMEOUT_MS, TimeUnit.MILLISECONDS)).andReturn(topicConfig);
EasyMock.expect(topicConfig.get(EasyMock.eq(CleanupPolicyProp()))).andReturn(new ConfigEntry(CleanupPolicyProp(),
EasyMock.expect(topicConfig.get(EasyMock.eq(TopicConfig.CLEANUP_POLICY_CONFIG))).andReturn(new ConfigEntry(TopicConfig.CLEANUP_POLICY_CONFIG,
DEFAULT_CLEANUP_POLICY));
EasyMock.expect(topicConfig.get(EasyMock.eq(RetentionMsProp()))).andReturn(new ConfigEntry(RetentionMsProp(),
EasyMock.expect(topicConfig.get(EasyMock.eq(TopicConfig.RETENTION_MS_CONFIG))).andReturn(new ConfigEntry(TopicConfig.RETENTION_MS_CONFIG,
MOCK_CURRENT_RETENTION_MS));
EasyMock.expect(adminClient.incrementalAlterConfigs(EasyMock.eq(Collections.singletonMap(MOCK_TOPIC_RESOURCE,
alterConfigOps))))
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.daemon=false
org.gradle.parallel=false
org.gradle.jvmargs=-Xms512m -Xmx512m
scalaVersion=2.13.10
kafkaVersion=3.3.1
kafkaVersion=3.5.0
zookeeperVersion=3.6.3
nettyVersion=4.1.92.Final
jettyVersion=9.4.51.v20230217
vertxVersion=4.4.3
vertxVersion=4.4.4

0 comments on commit 069949c

Please sign in to comment.