Skip to content

test(connectors): add e2e tests for Elasticsearch sink connector#2684

Open
seokjin0414 wants to merge 1 commit intoapache:masterfrom
seokjin0414:2592-elasticsearch-sink-e2e-tests
Open

test(connectors): add e2e tests for Elasticsearch sink connector#2684
seokjin0414 wants to merge 1 commit intoapache:masterfrom
seokjin0414:2592-elasticsearch-sink-e2e-tests

Conversation

@seokjin0414
Copy link
Contributor

Closes #2592

Summary

  • Add 3 e2e tests for Elasticsearch sink connector
  • Use testcontainers GenericImage with ES 8.17.0
  • Follow Quickwit fixture pattern (ElasticsearchOps trait, polling retry)

Tests

  • given_json_messages_should_index_documents - JSON indexing + field verification
  • given_bulk_messages_should_index_all - 500 bulk messages
  • given_messages_should_have_iggy_metadata - iggy* metadata field verification

Note

During testing, discovered a serialization bug in bulk_index_documents and reported it as #2683.
These tests will pass once that bug is fixed.

Add end-to-end tests for the Elasticsearch sink connector following the
existing test patterns (Quickwit, Postgres).

Tests:
- given_json_messages_should_index_documents: verifies JSON messages are
  correctly indexed with original fields preserved
- given_bulk_messages_should_index_all: verifies bulk indexing works
  correctly with 500 messages
- given_messages_should_have_iggy_metadata: verifies _iggy_* metadata
  fields are added to indexed documents

Infrastructure:
- ElasticsearchContainer: GenericImage-based container with ES 8.17.0,
  security disabled for testing
- ElasticsearchOps trait: common operations (refresh_index, search_all,
  fetch_documents)
- ElasticsearchFixture: TestFixture implementation with auto index
  creation

Closes apache#2592

Signed-off-by: shin <sars21@hanmail.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add e2e tests for Elasticsearch sink connector

1 participant