Skip to content

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>
@seokjin0414 seokjin0414 force-pushed the 2592-elasticsearch-sink-e2e-tests branch from 83aeafe to af9ce4f Compare February 8, 2026 14:24
WaitFor::message_on_stdout("started") alone is insufficient as ES HTTP
API may not be ready to accept connections yet. Add explicit health
check polling /_cluster/health endpoint before returning from start().

Signed-off-by: seokjin0414 <sars21@hanmail.net>
Signed-off-by: shin <sars21@hanmail.net>
@seokjin0414 seokjin0414 force-pushed the 2592-elasticsearch-sink-e2e-tests branch from af9ce4f to c339ce1 Compare February 8, 2026 14:37
@hubcio
Copy link
Contributor

hubcio commented Feb 11, 2026

@seokjin0414 do you plan to rebase this? can you verify if bug still exists? I think its fixed in #2685

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

2 participants