[kafka] branch trunk updated: MINOR: convert some tests to KRaft (#12155)
This is an automated email from the ASF dual-hosted git repository. cmccabe pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/trunk by this push: new a3e0af94f28 MINOR: convert some tests to KRaft (#12155) a3e0af94f28 is described below commit a3e0af94f2860a8d997017dcc2319396e62ff87f Author: Colin Patrick McCabe AuthorDate: Fri May 13 17:29:47 2022 -0700 MINOR: convert some tests to KRaft (#12155) Convert EndToEndClusterIdTest, ConsumerGroupCommandTest, ListConsumerGroupTest, and LogOffsetTest to test KRaft mode. Reviewers: Jason Gustafson , dengziming --- .../kafka/api/EndToEndClusterIdTest.scala | 11 +-- .../kafka/admin/ConsumerGroupCommandTest.scala | 2 +- .../unit/kafka/admin/ListConsumerGroupTest.scala | 25 --- .../scala/unit/kafka/server/LogOffsetTest.scala| 78 +- 4 files changed, 69 insertions(+), 47 deletions(-) diff --git a/core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala b/core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala index 2492903f535..25f7ce6a8c0 100644 --- a/core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala +++ b/core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala @@ -29,10 +29,12 @@ import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig, Produce import org.apache.kafka.common.{ClusterResource, ClusterResourceListener, TopicPartition} import org.apache.kafka.test.{TestUtils => _, _} import org.junit.jupiter.api.Assertions._ -import org.junit.jupiter.api.{BeforeEach, Test, TestInfo} +import org.junit.jupiter.api.{BeforeEach, TestInfo} import scala.jdk.CollectionConverters._ import org.apache.kafka.test.TestUtils.isValidClusterId +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.ValueSource /** The test cases here verify the following conditions. * 1. The ProducerInterceptor receives the cluster id after the onSend() method is called and before onAcknowledgement() method is called. @@ -99,7 +101,7 @@ class EndToEndClusterIdTest extends KafkaServerTestHarness { this.serverConfig.setProperty(KafkaConfig.MetricReporterClassesProp, classOf[MockBrokerMetricsReporter].getName) override def generateConfigs = { -val cfgs = TestUtils.createBrokerConfigs(serverCount, zkConnect, interBrokerSecurityProtocol = Some(securityProtocol), +val cfgs = TestUtils.createBrokerConfigs(serverCount, zkConnectOrNull, interBrokerSecurityProtocol = Some(securityProtocol), trustStoreFile = trustStoreFile, saslProperties = serverSaslProperties) cfgs.foreach(_ ++= serverConfig) cfgs.map(KafkaConfig.fromProps) @@ -113,8 +115,9 @@ class EndToEndClusterIdTest extends KafkaServerTestHarness { createTopic(topic, 2, serverCount) } - @Test - def testEndToEnd(): Unit = { + @ParameterizedTest + @ValueSource(strings = Array("zk", "kraft")) + def testEndToEnd(quorum: String): Unit = { val appendStr = "mock" MockConsumerInterceptor.resetCounters() MockProducerInterceptor.resetCounters() diff --git a/core/src/test/scala/unit/kafka/admin/ConsumerGroupCommandTest.scala b/core/src/test/scala/unit/kafka/admin/ConsumerGroupCommandTest.scala index 571f2dbf4d7..6851ba2d476 100644 --- a/core/src/test/scala/unit/kafka/admin/ConsumerGroupCommandTest.scala +++ b/core/src/test/scala/unit/kafka/admin/ConsumerGroupCommandTest.scala @@ -46,7 +46,7 @@ class ConsumerGroupCommandTest extends KafkaServerTestHarness { // configure the servers and clients override def generateConfigs = { -TestUtils.createBrokerConfigs(1, zkConnect, enableControlledShutdown = false).map { props => +TestUtils.createBrokerConfigs(1, zkConnectOrNull, enableControlledShutdown = false).map { props => KafkaConfig.fromProps(props) } } diff --git a/core/src/test/scala/unit/kafka/admin/ListConsumerGroupTest.scala b/core/src/test/scala/unit/kafka/admin/ListConsumerGroupTest.scala index 11fd0a3b1f2..4e7575e797c 100644 --- a/core/src/test/scala/unit/kafka/admin/ListConsumerGroupTest.scala +++ b/core/src/test/scala/unit/kafka/admin/ListConsumerGroupTest.scala @@ -18,16 +18,19 @@ package kafka.admin import joptsimple.OptionException import org.junit.jupiter.api.Assertions._ -import org.junit.jupiter.api.Test import kafka.utils.TestUtils import org.apache.kafka.common.ConsumerGroupState import org.apache.kafka.clients.admin.ConsumerGroupListing import java.util.Optional +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.ValueSource + class ListConsumerGroupTest extends ConsumerGroupCommandTest { - @Test - def testListConsumerGroups(): Unit = { + @ParameterizedTest + @ValueSource(strings = Array("zk", "kraft")) + def testListConsumerGroups(quorum: String): Unit = { val simpleGroup =
[kafka] branch trunk updated: MINOR: Add upgrade tests for FK joins (#12122)
This is an automated email from the ASF dual-hosted git repository. mjsax pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/trunk by this push: new 78dd40123cc MINOR: Add upgrade tests for FK joins (#12122) 78dd40123cc is described below commit 78dd40123cc47e425264f516a4b8c6c2003c99b8 Author: Alex Sorokoumov <918393+ger...@users.noreply.github.com> AuthorDate: Sat May 14 02:21:27 2022 +0200 MINOR: Add upgrade tests for FK joins (#12122) Follow up PR for KAFKA-13769. Reviewers: Matthias J. Sax --- .../kafka/streams/tests/SmokeTestDriver.java | 104 -- .../kafka/streams/tests/SmokeTestDriver.java | 113 ++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 112 ++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 114 ++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 101 ++ .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 112 ++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 112 ++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- .../kafka/streams/tests/SmokeTestDriver.java | 116 +++-- .../kafka/streams/tests/StreamsUpgradeTest.java| 45 ++-- tests/kafkatest/services/streams.py| 5 +- .../tests/streams/streams_upgrade_test.py | 77 +- tests/kafkatest/version.py | 3 + 18 files changed, 962 insertions(+), 322 deletions(-) diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java index ac83cd95eba..2bbb25db395 100644 --- a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java +++ b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java @@ -30,6 +30,7 @@ import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.errors.TimeoutException; import org.apache.kafka.common.serialization.ByteArraySerializer; import org.apache.kafka.common.serialization.Deserializer; +import org.apache.kafka.common.serialization.Serde; import org.apache.kafka.common.serialization.StringDeserializer; import org.apache.kafka.common.utils.Exit; import org.apache.kafka.common.utils.Utils; @@ -60,7 +61,7 @@ import static java.util.Collections.emptyMap; import static org.apache.kafka.common.utils.Utils.mkEntry; public class SmokeTestDriver extends SmokeTestUtil { -private static final String[] TOPICS = { +private static final String[] NUMERIC_VALUE_TOPICS = { "data", "echo", "max", @@ -72,6 +73,15 @@ public class SmokeTestDriver extends SmokeTestUtil { "avg", "tagg" }; +private static final String[] STRING_VALUE_TOPICS = { +"fk" +}; + +private static final String[] TOPICS = new String[NUMERIC_VALUE_TOPICS.length + STRING_VALUE_TOPICS.length]; +static { +System.arraycopy(NUMERIC_VALUE_TOPICS, 0, TOPICS, 0, NUMERIC_VALUE_TOPICS.length); +System.arraycopy(STRING_VALUE_TOPICS, 0, TOPICS, NUMERIC_VALUE_TOPICS.length, STRING_VALUE_TOPICS.length); +} private static final int MAX_RECORD_EMPTY_RETRIES = 30; @@ -163,7 +173,8 @@ public class SmokeTestDriver extends SmokeTestUtil { final long recordPauseTime = timeToSpend.toMillis() / numKeys / maxRecordsPerKey; -List> needRetry = new ArrayList<>(); +final List> dataNeedRetry = new ArrayList<>(); +final List> fkNeedRetry = new ArrayList<>(); try (final KafkaProducer producer = new KafkaProducer<>(producerProps)) { while (remaining > 0) { @@ -183,7 +194,16 @@ public class SmokeTestDriver extends SmokeTestUtil { intSerde.serializer().serialize("", value) ); -producer.send(record, new TestCallback(record, needRetry)); +producer.send(record, new TestCallback(record, dataNeedRetry)); + +final ProducerRecord fkRecord = +new ProducerRecord<>( +"fk", +intSerde.serializer().serialize("", value), +stringSerde.serializer().serialize("", key) +); + +producer.send(fkRecord, new TestCallback(fkRecord, fkNeedRetry)); numRecordsProduced++;
[kafka] branch trunk updated (467bce04ae4 -> f96e3813876)
This is an automated email from the ASF dual-hosted git repository. guozhang pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git from 467bce04ae4 MINOR: Update release versions for upgrade tests with 3.1.1 release (#12156) add f96e3813876 KAFKA-13746: Attempt to fix flaky test by waiting on metadata update (#12104) No new revisions were added by this update. Summary of changes: .../kafka/admin/TopicCommandIntegrationTest.scala | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-)
[kafka-site] branch asf-site updated: MINOR: Update downloads.html for 3.1.1 (#411)
This is an automated email from the ASF dual-hosted git repository. tombentley pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/kafka-site.git The following commit(s) were added to refs/heads/asf-site by this push: new 322c407c MINOR: Update downloads.html for 3.1.1 (#411) 322c407c is described below commit 322c407ca9786962480d35ce3b9fe58c8e30f8aa Author: Tom Bentley AuthorDate: Fri May 13 11:47:02 2022 +0100 MINOR: Update downloads.html for 3.1.1 (#411) --- downloads.html | 38 +- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/downloads.html b/downloads.html index 5db64a87..df3fa394 100644 --- a/downloads.html +++ b/downloads.html @@ -6,12 +6,40 @@ Download -3.1.0 is the latest release. The current stable version is 3.1.0. +3.1.1 is the latest release. The current stable version is 3.1.1. You can verify your download by following these https://www.apache.org/info/verification.html;>procedures and using these https://downloads.apache.org/kafka/KEYS;>KEYS. + +3.1.1 + + +Released May 13, 2022 + + +https://downloads.apache.org/kafka/3.1.1/RELEASE_NOTES.html;>Release Notes + + +Source download: https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.1/kafka-3.1.1-src.tgz;>kafka-3.1.1-src.tgz (https://downloads.apache.org/kafka/3.1.1/kafka-3.1.1-src.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.1/kafka-3.1.1-src.tgz.sha512;>sha512) + + +Binary downloads: + +Scala 2.12 - https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.1/kafka_2.12-3.1.1.tgz;>kafka_2.12-3.1.1.tgz (https://downloads.apache.org/kafka/3.1.1/kafka_2.12-3.1.1.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.1/kafka_2.12-3.1.1.tgz.sha512;>sha512) +Scala 2.13 - https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.1/kafka_2.13-3.1.1.tgz;>kafka_2.13-3.1.1.tgz (https://downloads.apache.org/kafka/3.1.1/kafka_2.13-3.1.1.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.1/kafka_2.13-3.1.1.tgz.sha512;>sha512) + +We build for multiple versions of Scala. This only matters if you are using Scala and you want a version +built for the same Scala version you use. Otherwise any version should work (2.13 is recommended). + + + + +Kafka 3.1.1 fixes 29 issues since the 3.1.0 release. +For more information, please read the detailed https://downloads.apache.org/kafka/3.1.1/RELEASE_NOTES.html;>Release Notes. + + 3.1.0 @@ -19,16 +47,16 @@ Released January 24, 2022 -https://downloads.apache.org/kafka/3.1.0/RELEASE_NOTES.html;>Release Notes +https://archive.apache.org/dist/kafka/3.1.0/RELEASE_NOTES.html;>Release Notes -Source download: https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.0/kafka-3.1.0-src.tgz;>kafka-3.1.0-src.tgz (https://downloads.apache.org/kafka/3.1.0/kafka-3.1.0-src.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.0/kafka-3.1.0-src.tgz.sha512;>sha512) +Source download: https://archive.apache.org/dist/kafka/3.1.0/kafka-3.1.0-src.tgz;>kafka-3.1.0-src.tgz (https://archive.apache.org/dist/kafka/3.1.0/kafka-3.1.0-src.tgz.asc;>asc, https://archive.apache.org/dist/kafka/3.1.0/kafka-3.1.0-src.tgz.sha512;>sha512) Binary downloads: -Scala 2.12 - https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.0/kafka_2.12-3.1.0.tgz;>kafka_2.12-3.1.0.tgz (https://downloads.apache.org/kafka/3.1.0/kafka_2.12-3.1.0.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.0/kafka_2.12-3.1.0.tgz.sha512;>sha512) -Scala 2.13 - https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.0/kafka_2.13-3.1.0.tgz;>kafka_2.13-3.1.0.tgz (https://downloads.apache.org/kafka/3.1.0/kafka_2.13-3.1.0.tgz.asc;>asc, https://downloads.apache.org/kafka/3.1.0/kafka_2.13-3.1.0.tgz.sha512;>sha512) +Scala 2.12 - https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz;>kafka_2.12-3.1.0.tgz (https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz.asc;>asc, https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz.sha512;>sha512) +Scala 2.13 - https://archive.apache.org/dist/kafka/3.1.0/kafka_2.13-3.1.0.tgz;>kafka_2.13-3.1.0.tgz (https://archive.apache.org/dist/kafka/3.1.0/kafka_2.13-3.1.0.tgz.asc;>asc, https://archive.apache.org/dist/kafka/3.1.0/kafka_2.13-3.1.0.tgz.sha512;>sha512) We build for multiple versions of Scala. This only matters if you are using Scala and you want a version built for the same Scala version you use. Otherwise any version should work (2.13 is recommended).
[kafka] branch trunk updated: MINOR: Update release versions for upgrade tests with 3.1.1 release (#12156)
This is an automated email from the ASF dual-hosted git repository. tombentley pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/trunk by this push: new 467bce04ae4 MINOR: Update release versions for upgrade tests with 3.1.1 release (#12156) 467bce04ae4 is described below commit 467bce04ae4cc0bacedeb82a1d130bd8b4e19304 Author: Tom Bentley AuthorDate: Fri May 13 09:32:41 2022 +0100 MINOR: Update release versions for upgrade tests with 3.1.1 release (#12156) Updates release versions in files that are used for upgrade test with the 3.1.1 release version. Reviewers: Bruno Cadonna --- gradle/dependencies.gradle | 2 +- tests/docker/Dockerfile| 6 +++--- tests/kafkatest/version.py | 3 ++- vagrant/base.sh| 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 6ce71917b7f..acad88aed53 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -99,7 +99,7 @@ versions += [ kafka_27: "2.7.1", kafka_28: "2.8.1", kafka_30: "3.0.1", - kafka_31: "3.1.0", + kafka_31: "3.1.1", kafka_32: "3.2.0", lz4: "1.8.0", mavenArtifact: "3.8.4", diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 25d39b8b294..736845b3d0b 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -64,7 +64,7 @@ RUN mkdir -p "/opt/kafka-2.6.2" && chmod a+rw /opt/kafka-2.6.2 && curl -s "$KAFK RUN mkdir -p "/opt/kafka-2.7.1" && chmod a+rw /opt/kafka-2.7.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-2.7.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-2.7.1" RUN mkdir -p "/opt/kafka-2.8.1" && chmod a+rw /opt/kafka-2.8.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-2.8.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-2.8.1" RUN mkdir -p "/opt/kafka-3.0.1" && chmod a+rw /opt/kafka-3.0.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.0.1" -RUN mkdir -p "/opt/kafka-3.1.0" && chmod a+rw /opt/kafka-3.1.0 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.1.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.1.0" +RUN mkdir -p "/opt/kafka-3.1.1" && chmod a+rw /opt/kafka-3.1.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.1.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.1.1" RUN mkdir -p "/opt/kafka-3.2.0" && chmod a+rw /opt/kafka-3.2.0 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.2.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.2.0" # Streams test dependencies @@ -84,8 +84,8 @@ RUN curl -s "$KAFKA_MIRROR/kafka-streams-2.6.2-test.jar" -o /opt/kafka-2.6.2/lib RUN curl -s "$KAFKA_MIRROR/kafka-streams-2.7.1-test.jar" -o /opt/kafka-2.7.1/libs/kafka-streams-2.7.1-test.jar RUN curl -s "$KAFKA_MIRROR/kafka-streams-2.8.1-test.jar" -o /opt/kafka-2.8.1/libs/kafka-streams-2.8.1-test.jar RUN curl -s "$KAFKA_MIRROR/kafka-streams-3.0.1-test.jar" -o /opt/kafka-3.0.1/libs/kafka-streams-3.0.1-test.jar -RUN curl -s "$KAFKA_MIRROR/kafka-streams-3.1.0-test.jar" -o /opt/kafka-3.1.0/libs/kafka-streams-3.1.0-test.jar -RUN curl -s "$KAFKA_MIRROR/kafka-streams-3.2.0-test.jar" -o /opt/kafka-3.1.0/libs/kafka-streams-3.2.0-test.jar +RUN curl -s "$KAFKA_MIRROR/kafka-streams-3.1.1-test.jar" -o /opt/kafka-3.1.1/libs/kafka-streams-3.1.1-test.jar +RUN curl -s "$KAFKA_MIRROR/kafka-streams-3.2.0-test.jar" -o /opt/kafka-3.2.0/libs/kafka-streams-3.2.0-test.jar # The version of Kibosh to use for testing. # If you update this, also update vagrant/base.sh diff --git a/tests/kafkatest/version.py b/tests/kafkatest/version.py index 76ea5cc4989..3a01a5adf58 100644 --- a/tests/kafkatest/version.py +++ b/tests/kafkatest/version.py @@ -219,7 +219,8 @@ LATEST_3_0 = V_3_0_1 # 3.1.x versions V_3_1_0 = KafkaVersion("3.1.0") -LATEST_3_1 = V_3_1_0 +V_3_1_1 = KafkaVersion("3.1.1") +LATEST_3_1 = V_3_1_1 # 3.2.x versions V_3_2_0 = KafkaVersion("3.2.0") diff --git a/vagrant/base.sh b/vagrant/base.sh index 3cf19e4d79f..0e69add6616 100755 --- a/vagrant/base.sh +++ b/vagrant/base.sh @@ -150,8 +150,8 @@ get_kafka 2.8.1 2.12 chmod a+rw /opt/kafka-2.8.1 get_kafka 3.0.1 2.12 chmod a+rw /opt/kafka-3.0.1 -get_kafka 3.1.0 2.12 -chmod a+rw /opt/kafka-3.1.0 +get_kafka 3.1.1 2.12 +chmod a+rw /opt/kafka-3.1.1 get_kafka 3.2.0 2.12 chmod a+rw /opt/kafka-3.2.0