The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add official support for Kafka versions 3.0.x through 3.4.x
- gquintana added the following method to
KafkaTestUtils
to allow for additional control over the records being produced. Thanks for the contribution!
public List<ProducedKafkaRecord<byte[], byte[]>> produceRecords(final Collection<ProducerRecord<byte[], byte[]>> records)
- JUnit5 from 5.8.2 to 5.9.2
- Fix CI Build scripts
- ISSUE-49 PR-63 Zookeeper AdminServer will no longer be started. This allows for more easily running tests in parallel. Thanks @gquintana for the contribution!
- JUnit4 from 4.13 to 4.13.2
- JUnit5 from 5.7.2 to 5.8.2
- Officially added support for Kafka versions 2.7.x, and 2.8.x
- JUnit5 from 5.6.2 to 5.7.2
- PR-46 Officially added support for Kafka versions 2.5.x, 2.6.x.
- JUnit5 from 5.6.0 to 5.6.2
- Officially added support for Kafka versions 2.1.x, 2.2.x, 2.3.x, 2.4.x.
- Fixes bug in
ZookeeperTestServer.start()
where calling start on an already running instance caused the instance to be restarted instead of being a no-operation. This caused issues with Kafka version 2.1.x on startup and shutdown causing tests to hang.
- JUnit4 from 2.12 to 2.13
- JUnit5 from 5.3.2 to 5.6.0
- ISSUE-38 Optionally allow for explicitly defining which ports kakfa brokers listen on.
- ISSUE-36 Temporary directories should now be cleaned up properly on JVM shutdown.
- Replace internal uses of Guava with JDK-comparable methods so that if a transitive dependency on Curator resolves to a more recent version that shades Guava this library will not break.
- Officially support Kafka 2.0.x
- KafkaTestUtils.produceRecords() and its variants now set producer configuration "acks" to "all"
- Update Kafka-JUnit5 junit dependency from 5.1.1 to JUnit 5.3.2
- Add support for registering PLAINTEXT, SSL, SASL_PLAIN, and SASL_SSL listeners on internal kafka brokers.
- Kafka Connection Strings now include the protocol prefix.
- Default configured host changed from '127.0.0.1' to 'localhost'
- Issue-16 Bugfix for re-using the same SharedKafkaTestResource instance multiple times, as might happen if you run a test multiple times.
- Update checkstyle plugin version to 3.0.0
- Added ability to start 1 or more Kafka brokers configured within a functional cluster. This allows you to now to test functionality that depends on more than one broker within your cluster, as well as scenarios around how your code handles broker availability.
- Expanded the methods available in the KafkaTestUtils class.
- Several accessors were removed from SharedKafkaTestResource and should now be accessed
via the KafkaTestUtils class. In most cases simply changing from
sharedKafkaTestResource.getKafkaServer()....
tosharedKafkaTestResource.getKafkaTestUtils()...
will be sufficient to migrate your code.
-
Issue-12 Added ability to pass broker properties to be used by test kafka service instance.
-
Added helper method getAdminClient() on KafkaTestServer to get a configured AdminClient instance.
-
Deprecated Kafka-JUnit5 @ExtendWith annotation implementations. This has been replaced in favor of @RegisterExtension annotation. Review README.md for more information on updated usage instructions.
-
Deprecated KafkaTestServer constructor:
public KafkaTestServer(final String localHostname)
This constructor was replaced with the constructor
KafkaTestServer(final Properties overrideBrokerProperties)
where overrideBrokerProperties should contain the propertyhost.name
set to the hostname or IP address Kafka should use.
- Issue-5 Updated to support Kafka versions 1.0.x and 1.1.x. Thanks kasuri!
- Issue-4 Fix server configuration to allow for transactional producers & consumers.
This library now requires you to provide which version of Kafka you want to use.
See below for an example...for more details refer to README.
<!-- Declare kafka-junit4 dependency -->
<dependency>
<groupId>com.salesforce.kafka.test</groupId>
<artifactId>kafka-junit4</artifactId>
<version>2.2.0</version>
<scope>test</scope>
</dependency>
<!-- Now required to include a kafka dependencies explicitly -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
<version>0.11.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>0.11.0.1</version>
<scope>test</scope>
</dependency>
- Bungled release. Please use version 2.2.0.
- Created new modules to support both JUnit4 and JUnit 5.
- Initial release!
- Based off of Kafka Server and Kafka-Clients version 0.11.0.1
- Built for JUnit 4.x