nzw921rx opened a new pull request, #11546:
URL: https://github.com/apache/seatunnel/pull/11546

   ## Purpose
   
   Fix the flaky `ElasticsearchRecipeIT#testMysqlCdcToElasticsearchRecipe` E2E 
test.
   
   ## Root cause
   
   `ElasticsearchRecipeIT` and `ElasticsearchSchemaChangeIT` both use the 
shared Docker network alias `mysql_cdc_e2e`.
   
   `ElasticsearchSchemaChangeIT` keeps a static MySQL container running with 
the `shop` database. When `ElasticsearchRecipeIT` starts another MySQL 
container with the `crm` database under the same alias, Docker DNS may resolve 
`mysql_cdc_e2e` to the wrong container.
   
   The failed CI run showed that the recipe job expected 
`crm.customer_profile`, but connected to the container containing `shop`:
   
   ```text
   list of available databases is:
   [information_schema, mysql, performance_schema, shop, sys]
   
   SnapshotSplitAssigner created with remaining tables: []
   ```
   
   Because no snapshot split was created, Elasticsearch remained empty and the 
test timed out with:
   
   ```text
   expected: <1> but was: <0> within 2 minutes
   ```
   
   ## Changes
   
   * Give `ElasticsearchRecipeIT` a dedicated MySQL network alias:
   
     * from `mysql_cdc_e2e`
     * to `mysql_cdc_elasticsearch_recipe_e2e`
   * Update `mysqlcdc_to_elasticsearch_recipe.conf` to use the new alias.
   
   This follows the same isolation approach used for 
`ElasticsearchTimerFlushIT` in #11531.
   
   ## User-facing change
   
   No. This change only improves E2E test isolation and stability.
   
   ## Validation
   
   ```bash
   ./mvnw spotless:apply
   ```
   
   ```bash
   ./mvnw \
     -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-elasticsearch-e2e \
     -DskipUT \
     -DskipIT \
     test-compile
   ```
   
   Focused Zeta E2E validation:
   
   ```bash
   RUN_ALL_CONTAINER=false RUN_ZETA_CONTAINER=true \
   ./mvnw \
     -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-elasticsearch-e2e \
     -DskipUT \
     -DskipIT=false \
     -Dit.test=ElasticsearchRecipeIT \
     verify
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to