Closed osoykan closed 10 hours ago
Total Project Coverage | 71.41% | :x: |
---|
Attention: Patch coverage is 59.85915%
with 57 lines
in your changes missing coverage. Please review.
Project coverage is 82.21%. Comparing base (
2043ba4
) to head (9858527
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request includes several changes to improve the serialization mechanism and enhance the Spring Kafka testing infrastructure. It is one of the works that need to be done to improve serialization support when users want to use Protobuf, Avro, JSON(already supported), and other serialization systems.
Most notable change is the change for
TestSystemKafkaInterceptor<*,*>
. The dependency for this class was an ObjectMapper instance that you can provide through bean provider/Spring-Boot DI, but now it relies onStoveSerde<T, K>
interface, hence users can replace it with their ser/de choices. I have written a test to prove the approach is working, take a look, ProtobufSerdeKafkaSystemTest.kt.Improvements to serialization mechanism:
examples/spring-example/src/test/kotlin/com/stove/spring/example/e2e/TestSystemInitializer.kt
: AddedStoveSerde.jackson.anyByteArraySerde()
bean to the test system dependencies.gradle/libs.versions.toml
: Updated thekotlinx-serialization
library to includejson
andprotobuf
modules. [1] [2]lib/stove-testing-e2e/build.gradle.kts
: Changed thekotlinx.serialization
dependency tokotlinx.serialization.json
.Enhancements to Kafka testing infrastructure:
starters/spring/stove-spring-testing-e2e-kafka/build.gradle.kts
: Added Protobuf plugin and related dependencies for Kafka streams. [1] [2]starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/Extensions.kt
: ReplacedObjectMapper
withStoveSerde
for message serialization.starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/KafkaSystem.kt
: Added support for Kafka admin operations and improved the message publishing mechanism usingStoveSerde
.Codebase simplifications:
examples/spring-streams-example/build.gradle.kts
: Replacedkafka-streams.registry
withkafka-streams.protobuf.serde
.starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/MessageStore.kt
: Updated theMessageStore
class to use simplified message types.Adresses #560