Skip to content
42 changes: 29 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,71 @@ jobs:
exclude_kafka_tests: 0_11_0_x

- kafka_version: 2.4.1
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 2.5.1
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 2.6.3
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 2.7.2
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 2.8.2
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.0.2
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.1.2
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.2.3
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.3.2
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.4.0
kafka_scala_version: kafka_2.12
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.5.0
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.6.0
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.7.0
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

- kafka_version: 3.8.0
kafka_scala_version: kafka_2.13
exclude_kafka_tests: 0_11_0_x

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

## Run tests against Open JDK8
## Run tests against Open JDK21
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 8
java-version: 21

## Cache maven dependencies
- name: Cache local Maven repository
Expand All @@ -105,7 +121,7 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

## Generate dummy SSL Certificates used in tests
- name: Generate Certificates for Tests
run: script/generateCertificatesForTests.sh
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.2.6 (UNRELEASED)

- Add support for JDK21
- Add official support for Kafka versions 3.5.x through 3.8.x
- Kafka Scala version from kafka_2.12 to kafka_2.13
- JUnit5 from 5.9.2 to 5.11.0
- Apache Curator from 2.12.0 to 5.7.0

## 3.2.5 (02/21/2023)
- Add official support for Kafka versions 3.0.x through 3.4.x
- [gquintana](https://github.com/gquintana) added the following method to `KafkaTestUtils` to allow for additional control over the records being produced.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ one or more "real" kafka brokers. No longer do you need to setup and coordinate

## Features
- Support for JUnit 4 and JUnit 5.
- Support for all Kafka versions from 0.11.0.x through 3.4.x
- Support for all Kafka versions from 0.11.0.x through 3.8.x
- Support for running either single broker cluster, or multi-broker clusters.
- Support for PLAINTEXT, SASL_PLAINTEXT, SASL_SSL, and SSL listeners.

Expand Down Expand Up @@ -73,4 +73,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## License

BSD 3-Clause [View License](LICENSE.txt).

Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public void start() {
false, //deleteDataDirectoryOnClose
-1, //serverId
-1, //tickTime
1000, //maxClientCnxns
customProperties
1000 //maxClientCnxns
);

// Create instance
Expand Down Expand Up @@ -154,4 +153,4 @@ public String getConnectString() {
}
return zkServer.getConnectString();
}
}
}
33 changes: 14 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,29 @@
<url>https://github.com/salesforce/kafka-junit/tree/master</url>
</scm>

<!-- Require Maven 3.3.9 -->
<!-- Require Maven 3.9.9 -->
<prerequisites>
<maven>3.3.9</maven>
<maven>3.9.9</maven>
</prerequisites>

<!-- defined properties -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.release>21</maven.compiler.release>

<!-- Define which kafka version -->
<kafkaVersion>3.4.0</kafkaVersion>
<kafkaScalaVersion>kafka_2.12</kafkaScalaVersion>
<kafkaVersion>3.8.0</kafkaVersion>
<kafkaScalaVersion>kafka_2.13</kafkaScalaVersion>

<!-- Define which Curator Test version -->
<curatorTestVersion>2.12.0</curatorTestVersion>
<curatorTestVersion>5.7.0</curatorTestVersion>

<!-- For logging in tests -->
<slf4jVersion>1.7.36</slf4jVersion>

<!-- JUnit versions -->
<junit4.version>4.13.2</junit4.version>
<junit5.version>5.9.2</junit5.version>
<junit5.version>5.11.0</junit5.version>
<junit5PlatformProvider.version>1.3.2</junit5PlatformProvider.version>

<!-- test toggling -->
Expand All @@ -102,8 +101,8 @@
<checkstyle.ruleset>script/checkstyle-ruleset.xml</checkstyle.ruleset>

<!-- plugin versions -->
<checkstyle.version>3.1.0</checkstyle.version>
<javadoc.version>3.3.0</javadoc.version>
<checkstyle.version>3.5.0</checkstyle.version>
<javadoc.version>3.10.0</javadoc.version>
<surefire.version>2.22.2</surefire.version>

<!-- excluded tests based on specific kafka versions -->
Expand Down Expand Up @@ -183,11 +182,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.13.0</version>
<configuration>
<!-- source and target is java 1.8 -->
<source>1.8</source>
<target>1.8</target>
<!-- source and target is java 21 -->
<release>21</release>
<testExcludes>
<!-- by default exclude kafka 0.11.0.x specific tests -->
<testExclude>**/kafka_${tests.excluded}/*.java</testExclude>
Expand Down Expand Up @@ -274,7 +272,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.29</version>
<version>10.18.1</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -291,7 +289,7 @@
<version>${javadoc.version}</version>
<configuration>
<show>public</show>
<source>8</source>
<source>21</source>
</configuration>
</plugin>

Expand Down Expand Up @@ -337,9 +335,6 @@
<goals>
<goal>jar</goal>
</goals>
<configuration>
<source>8</source>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion script/checkstyle-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="false"/>
<property name="allowMissingReturnTag" value="false"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down