[INLONG-11495][Sort] Add end-to-end test for Kafka connector v1.18 #11554
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.
Fixes #11495
Fixes #11553
Motivation
To verify the correctness of #11494 in a formal way.
To fix the problem of #11494, which is documented in #11553
Modifications
For #11495, added end2end test for Kafka connector by producing kafka message with
kafka-clients
dependency and extract the information with Kafka connector introduced by #11494. To better automate the whole process, the result is loaded to Elasticsearch7 with the existing elsasticsearch7-inlong connector. The result is then retrieved by elasticsearch client dependency and compared with the expected result.Also, some unused dependecies are removed and the test connects to elasticsearch with co.elastic instead of high-level client.
For #11553, the package name in meta-inf of the Kafka connnector is corrected, so that the
DynamicFactory
class can work properly.Verifying this change
This change is a trivial rework/code cleanup without any test coverage.
This change is already covered by existing tests, such as:
This change added tests and can be verified as follows:
switch to
inlong/inlong-sort/sort-end-to-end-tests/sort-end-to-end-tests-v1.18
directory and runmvn clean test -Dtest=Kafka2Elasticsearch7Test
Documentation