Skip to content

debezium/dbz#1810 Add automated E2E tests for the mongodb-outbox example#410

Open
KMohnishM wants to merge 1 commit into
debezium:mainfrom
KMohnishM:dbz-1810-1
Open

debezium/dbz#1810 Add automated E2E tests for the mongodb-outbox example#410
KMohnishM wants to merge 1 commit into
debezium:mainfrom
KMohnishM:dbz-1810-1

Conversation

@KMohnishM
Copy link
Copy Markdown
Contributor

Description

Fixes debezium/dbz#1810

This PR introduces automated end-to-end testing for the mongodb-outbox example, utilizing the shared YAML-driven test runner established in #406.

Changes

  • MongoDB Outbox E2E Test Manifest: Added mongodb-outbox/test.yaml which defines the full test workflow:
    • Builds and starts all services via Docker Compose.
    • Registers the MongoDB outbox connector.
    • Executes a multi-document transaction using mongosh to insert an order and outbox event simultaneously.
    • Consumes the Order.events Kafka topic to verify that the Debezium outbox router properly expanded and published the event payload.
  • Docker Compose Fix: Removed deprecated OpenTracing interceptors from mongodb-outbox/docker-compose.yaml to prevent a ClassNotFoundException that was causing the connector task to crash on startup in modern images.

Verification

  • Tested locally via python3 scripts/run-example-test.py mongodb-outbox.
  • Confirmed that the services start, the transaction executes successfully, and the Kafka consumer reads the correct expanded payload.

Checklist

  • If the changes include a new example, I added it to the list of examples in the README.md file

Comment on lines -55 to 59
consumer.interceptor.classes=io.opentracing.contrib.kafka.TracingConsumerInterceptor
producer.interceptor.classes=io.opentracing.contrib.kafka.TracingProducerInterceptor
- JAEGER_SERVICE_NAME=kafka-connect
- JAEGER_AGENT_HOST=jaeger
- JAEGER_SAMPLER_TYPE=const
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Strimzi moved from OpenTracing to OpenTel, I wonder whether we should also consider replacing OpenTracing with OpenTel here to maintain consistency?

I realize that's somewhat outside the scope of the PR, but if we have to remove OpenTracing, it seems the best course is to ensure OpenTel is enabled and drop Jaeger entirely?

@KMohnishM
Copy link
Copy Markdown
Contributor Author

That makes total sense @Naros ! Since we had to remove the deprecated OpenTracing interceptors anyway, I've updated the docker-compose.yaml in the latest commit to enable OpenTelemetry (STRIMZI_TRACING=opentelemetry) and dropped the Jaeger service entirely as suggested. I set the OpenTel exporters to none to keep the logs clean since we're just testing the outbox routing here.

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.

Implement automated testing framework for debezium-examples

2 participants