android / android/snippets

## Pull request overview

Closed
#985 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.1k
Forks
419
Avg merge
3d 18h
Merged PRs (30d)
28

Description

## Pull request overview

Backport to `stable/8.8` that aims to reduce archiver integration-test flakiness when tests share an OpenSearch cluster by scoping test data per run, reducing cluster-wide operations, and making retention/ISM handling less contention-prone.

**Changes:**
- Introduces a per-test `testPrefix` in the archiver IT base class, uses it for index prefixing and more targeted refreshes, and increases wait timeouts via a shared `ARCHIVE_TIMEOUT`.
- Reduces OpenSearch pressure by refreshing only prefixed indices and setting `numberOfReplicas=0` for test-created indices.
- Reworks OpenSearch archiver repository IT cleanup to delete only test-owned indices/policies instead of deleting `*`.

### Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

| File | Description |
| ---- | ----------- |
| zeebe/exporters/camunda-exporter/src/test/java/io/camunda/exporter/tasks/archiver/UsageMetricsArchiverJobIT.java | Uses scoped refresh (`refresh(testPrefix)`) and shared timeout to reduce cluster-wide operations and flakiness. |
| zeebe/exporters/camunda-exporter/src/test/java/io/camunda/exporter/tasks/archiver/StandaloneDecisionArchiverJobIT.java | Same scoped refresh/timeout approach for decision archiver tests. |
| zeebe/exporters/camunda-exporter/src/test/java/io/camunda/exporter/tasks/archiver/OpenSearchArchiverRepositoryIT.java | Switches from global cleanup to per-test unique IDs and targeted deletion of indices/policies. |
| zeebe/exporters/camunda-exporter/src/test/java/io/camunda/exporter/tasks/archiver/ArchiverJobIT.java | Adds per-test index prefixing and replicas=0 to reduce cross-test collisions and shard readiness issues. |

_Publicado originalmente por @copilot-pull-request-reviewer en https://github.com/camunda/camunda/pull/57556#pullrequestreview-4683991206_

Contributor guide

Open the contributing guide

Research direction

Start with the four archiver integration-test files listed in the overview, especially ArchiverJobIT.java and OpenSearchArchiverRepositoryIT.java, to trace shared prefixes, refreshes, timeouts, and cleanup. Run the archiver integration tests against a shared OpenSearch cluster; done means test data and cleanup remain scoped per run and the flakiness-reduction changes work without broad cluster-wide operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.