Skip to content

[Backport stable/8.9] test(agentic-ai): wait for active inbound executable to fix flaky A2A e2e tests#7131

Merged
maff merged 1 commit into
stable/8.9from
backport-7100-to-stable/8.9
May 5, 2026
Merged

[Backport stable/8.9] test(agentic-ai): wait for active inbound executable to fix flaky A2A e2e tests#7131
maff merged 1 commit into
stable/8.9from
backport-7100-to-stable/8.9

Conversation

@maff
Copy link
Copy Markdown
Member

@maff maff commented May 5, 2026

Description

Backport of #7100 to stable/8.9.

… e2e tests (#7100)

* test(agentic-ai): wait for active inbound executable in A2A e2e tests

The A2A webhook and polling e2e tests called `waitForElementActivation`
which only checks that the BPMN catch event is active in the process.
The inbound executable registry, however, processes activation events
asynchronously via a scheduled task (fixedDelay = 1000ms). As a result,
the inbound subscription could still be registering when the test sent
its (delayed) HTTP POST or when the polling task was expected to start,
causing flaky failures (issue #7033).

Add an `awaitActiveInboundExecutable(elementId)` helper to
`InboundConnectorTestHelper` that polls the executable registry until an
executable for the element is registered and reports `Health.Status.UP`.
Use it in the A2A standalone and AI Agent A2A integration tests after
`waitForElementActivation`. Also trigger the import scheduler manually
in the standalone polling test so it no longer depends on the default
5s scheduler tick.

Closes #7033

* test(agentic-ai): consolidate A2A inbound connector readiness helper

Address review feedback: extract the common
"trigger import + wait for element + wait for executable" pattern into
a single TestUtil.awaitInboundConnectorReady helper, used uniformly for
both webhook and polling A2A tests. Trim the inline comments at call
sites; the rationale lives in the javadoc.

* test(agentic-ai): apply spotless formatting

* test(agentic-ai): inline awaitInboundConnectorReady in L4J A2A tests

* test(agentic-ai): wait for element activation before triggering import

Order the steps in awaitInboundConnectorReady so the BPMN catch event is
already active when the executable activates. For polling, this ensures
the fetcher's first iteration (initialDelay=0) sees the running process
instance instead of running while the instance is still en route to the
catch event and missing it for one polling cycle.

(cherry picked from commit 60af440)
@maff maff added the e2e-tests label May 5, 2026
@maff maff self-assigned this May 5, 2026
@maff maff added the agentic-ai label May 5, 2026
@maff maff marked this pull request as ready for review May 5, 2026 07:55
@maff maff requested review from a team as code owners May 5, 2026 07:55
@maff maff requested a review from ztefanie May 5, 2026 07:55
@maff maff removed the request for review from mathias-vandaele May 5, 2026 08:03
@maff maff merged commit 57ee489 into stable/8.9 May 5, 2026
59 of 62 checks passed
@maff maff deleted the backport-7100-to-stable/8.9 branch May 5, 2026 08:54
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🎉 This pull request has been included in release 8.9.3!

Thank you for your contribution! 🚀

@github-actions github-actions Bot added the version:8.9.3 Released in version 8.9.3 label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants