The GitHub Actions job "CI" on pekko-connectors.git/elasticsearch-test-cleanup 
has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
9bfdbe22cfd4d5702ffdf5a222a015cfd35aaa52 / PJ Fanning 
<[email protected]>
Elasticsearch: delete test indices by name instead of _all

Motivation:
Every test suite wipes its server between runs with `DELETE /_all`, and
none of them check the response. Elasticsearch 8 changed
`action.destructive_requires_name` to default to true, which refuses
wildcard and `_all` destructive operations, so from Elasticsearch 8 on
the cleanup silently does nothing. Documents then survive into the next
suite, where they are read back by a suite that cannot deserialize them:
the Java `Book` has only a `title`, while the Scala one also carries a
`price`.

Modification:
Replaced the `_all` deletions with a shared helper that lists the
indices via `_cat/indices` and deletes them by explicit name, which
every supported server accepts. Both the list and the delete response
are checked, so a cleanup that stops working fails the suite instead of
passing quietly. Added it as `deleteAllIndices` in
`ElasticsearchSpecUtils` for the Scala suites and rewrote
`ElasticsearchTestBase.cleanIndex` for the Java ones. Also renamed the
Scala `sink3-0` index to `sink3-0-scala`, the last index name shared
between a Java and a Scala suite on the same server.

Result:
Cleanup works on every server the tests run against, and a future
regression in it surfaces as a failure rather than as a confusing
deserialization error in an unrelated suite.

Tests:
- `sbt "elasticsearch/Test/compile"` - success, no warnings
- `sbt "++3.3.8 elasticsearch/Test/compile"` - success
- `sbt "elasticsearch/scalafmtAll" "elasticsearch/javafmtAll"` - success
- Integration run relies on the `elasticsearch` CI job; no local Docker.

References:
None - test isolation cleanup

Report URL: https://github.com/apache/pekko-connectors/actions/runs/34358518712

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to