Serge Huber created UNOMI-937:
---------------------------------

             Summary: Stabilize integration tests and align GitHub Actions with 
build.sh
                 Key: UNOMI-937
                 URL: https://issues.apache.org/jira/browse/UNOMI-937
             Project: Apache Unomi
          Issue Type: Sub-task
          Components: build
    Affects Versions: unomi-3.1.0
            Reporter: Serge Huber
            Assignee: Serge Huber
             Fix For: unomi-3.1.0


h2. Summary

Reduce integration-test flakiness in CI and align GitHub Actions with the 
developer \{{build.sh}} workflow, so the Git Town stack (#754+) inherits stable 
ITs before Docker-based Elasticsearch lands in UNOMI-921.

h2. Problem

* CI intermittently fails on timing-sensitive ITs (e.g. \{{GraphQLListIT}}, 
\{{PatchIT}}) while local \{{./build.sh}} runs are more reliable.
* GitHub Actions invoke raw \{{mvn}} with different flags/caching than 
\{{build.sh}}, so CI and local dev diverge.
* Planned stack work (UNOMI-921 / PR #759) should stay limited to Docker ES in 
\{{itests/pom.xml}}; hardening and CI alignment belong in a separate change 
merged first.

h2. Scope

h3. Integration test hardening (\{{itests/}})

* Replace fixed \{{Thread.sleep}} with \{{keepTrying}} polling where 
appropriate (pattern from \{{GraphQLEventIT}}).
* \{{GraphQLListIT}} — wait for list/query results instead of fixed delay.
* \{{PatchIT}} — poll after \{{definitionsService.refresh()}} before asserting 
patch state.
* \{{BaseIT}} — shared helpers for profile/event assertions after async rule 
execution where useful.
* \{{IncrementPropertyIT}}, \{{PropertiesUpdateActionIT}} — poll for profile 
updates instead of relying on a single \{{eventService.send()}} return.

h3. \{{build.sh}} CI mode

* Non-interactive operation when \{{CI}}, \{{GITHUB_ACTIONS}}, or \{{--ci}} is 
set.
* Support \{{MAVEN_EXTRA_OPTS}} for matrix-specific JVM/port overrides.
* Document/use \{{--no-maven-cache}} for IT jobs where stale SNAPSHOT cache 
causes false failures.

h3. GitHub Actions (\{{.github/workflows/unomi-ci-build-tests.yml}})

* Unit and integration-test jobs invoke \{{./build.sh}} with flags aligned to 
local dev (e.g. \{{--ci}}, \{{--no-karaf}}, \{{--no-maven-cache}}, 
\{{--integration-tests}}, \{{--use-opensearch}} per matrix).
* Keep existing prerequisites (e.g. Graphviz) unchanged.

h2. Out of scope

* Docker Elasticsearch migration — 
[UNOMI-921|https://issues.apache.org/jira/browse/UNOMI-921] / PR #759.
* Progress-aware IT runner — 
[UNOMI-912|https://issues.apache.org/jira/browse/UNOMI-912].
* Phase T \{{AllITs}} registration / \{{HealthCheckIT}} ordering.
* Platform production fixes (UNOMI-139 stack / PR #760).

h2. Acceptance criteria

* \{{build.sh --ci}} runs non-interactively in GitHub Actions without prompts.
* CI unit and IT workflows use \{{./build.sh}} with documented flags; behavior 
matches local documented invocations.
* Target flaky ITs use polling/\{{keepTrying}} instead of fixed sleeps for the 
scenarios listed above.
* IT matrix (OpenSearch + Elasticsearch) passes on the A-1 branch PR; stack can 
rebase UNOMI-921 on top without duplicating hardening commits.
* No change to \{{itests/pom.xml}} Elasticsearch Docker profile (reserved for 
UNOMI-921).

h2. Implementation notes (for PR branch)

* Branch (planned): \{{UNOMI-<KEY>-itests-hardening-ci}} off \{{master}}.
* Git Town stack: merge this PR before rebasing \{{UNOMI-921-itests-es-docker}} 
/ PR #759 onto it.
* Tracker: \{{.local-notes/old-PR-757-now-760-stack-extraction-tracker.md}} 
(Phase A-1 + A0 split).

h2. References

* [UNOMI-921|https://issues.apache.org/jira/browse/UNOMI-921] — blocked until 
this issue is merged (stack order).
* [UNOMI-892|https://issues.apache.org/jira/browse/UNOMI-892] — Maven build 
cache / CI performance.
* [UNOMI-875|https://issues.apache.org/jira/browse/UNOMI-875] — Unomi Version 3 
parent.
* GitHub PR #759 (Docker ES) — stacks on A-1 branch after this ticket exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to