Setup CI tests against official Kafka broker #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes across multiple files, primarily focusing on setting up Kafka, updating dependencies, and refining test cases. The most important changes include adding Kafka installation steps to the CI workflow, updating the staticcheck action version, refining test cases, and adding a new Kafka configuration file.
CI Workflow Enhancements:
.github/workflows/test.yml
: Added steps to install Kafka during the CI workflow..github/workflows/test.yml
: Updated thestaticcheck
action to version1.3.1
and itsversion
to2024.1
.Test Case Refinements:
internal/stages_test.go
: Addedregexp
import and modifiedTestStages
to normalize tester output by removing specific error messages. [1] [2]internal/stages_test.go
: Renamed a test case fromtransactions_pass
tobase_stages_pass
.Kafka Configuration:
internal/test_helpers/pass_all/kraft.server.properties
: Added a new Kafka configuration file for KRaft mode.internal/test_helpers/pass_all/your_program.sh
: Modified the script to start Kafka using the new configuration file.Codebase Improvements:
internal/kafka_executable/kafka_executable.go
: Simplified the condition check inRun
method by removing a redundant nil check.protocol/encoder/real_encoder.go
: Added a return statement inPutNullableCompactString
to handle nil input.These changes collectively improve the CI workflow, enhance test reliability, and streamline Kafka setup and configuration.