Skip to content

Restore durable AMQP test broker setup - #7301

Draft
Johnathan W (j7nw4r) wants to merge 3 commits into
mainfrom
j7nw4r/durable-amqp-broker
Draft

Restore durable AMQP test broker setup#7301
Johnathan W (j7nw4r) wants to merge 3 commits into
mainfrom
j7nw4r/durable-amqp-broker

Conversation

@j7nw4r

Copy link
Copy Markdown
Member

Summary

Restores broker-backed azure-core-amqp tests after the temporary unblock in PR 7270. Pins TestAmqpBroker to commit 239aff0d87b2c19e1fa91636e0fc0f6ee6e9999a from Azure/azure-amqp PR 318, then fails setup when the pinned broker cannot build, start, or accept connections.

Motivation

Work item 39130334 requires a CFSClean broker build, executed C++ AMQP tests, a fixed broker SHA, and a failing pipeline when broker startup fails.

PR 7270 is merged into main. This PR targets main as a focused follow-up. Larry's branch is unchanged. The broker commit is currently the head of draft PR 318, and the C++ setup keeps the exact SHA explicit.

Changes

  • Restores TestAmqpBroker through its checked-in nuget.cfsclean.config, builds net10.0 with --no-restore, captures process logs, and polls the configured TCP endpoint for readiness.
  • Restores TEST_BROKER_ADDRESS through TestEnv and EnvVars, fatal missing-broker failures, and the prior 81 percent line coverage gate.
  • Documents the broker pin and update validation process.

Validation

  • PowerShell parser and git diff --check
  • sdk/core/ci.yml parsed with powershell-yaml
  • Pinned broker restore, build, process launch, and readiness check
  • Targeted azure-core-amqp-tests CMake build
  • 146 of 146 azure-core-amqp CTest cases passed against the broker
  • TestConnections.ConnectionOpenClose failed as expected without TEST_BROKER_ADDRESS

Johnathan Walker and others added 2 commits August 7, 2026 11:55
Pin the broker to its CFSClean-ready commit and verify TCP
readiness before tests run.

Restore broker environment propagation, fatal setup failures, and the
prior coverage gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add local spelling directives for the broker config name and the
existing AIDEV note anchor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Nothing stopped the broker. Test-Setup.ps1 started it with Start-Process
and recorded the process id in an environment variable, but
Test-Cleanup.ps1 used the job commands, which cannot act on a process
id, and ci.yml kept PostTestSteps commented out. The new port check then
turned that leak into a hard failure on a reused agent.

Write the process id to a file next to the broker logs, and read that
file in the cleanup script. Move the shared paths and the stop function
into Test-Broker-Common.ps1, so the two scripts cannot drift. Enable
PostTestSteps with a condition of always, because the broker must stop
even when the tests fail.

Stop a broker that an earlier run left behind before the clone. A
process that still holds the port after that belongs to somebody else,
so warn and use it instead of failing. Check the process name before
any stop, because the operating system reuses process ids.

Add TEST_BROKER_COMMIT to override the pinned commit without a code
change, and test whether the pin is reachable from master through the
GitHub compare API. An unreachable pin warns, and
TEST_BROKER_REQUIRE_MERGED turns that warning into an error. A check
that cannot run always continues.

Replace the anchor comment with a plain comment, and correct the cspell
list and the README section for this package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants