Restore durable AMQP test broker setup - #7301
Draft
Johnathan W (j7nw4r) wants to merge 3 commits into
Draft
Conversation
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: 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. |
Larry Osterman (LarryOsterman)
approved these changes
Aug 7, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores broker-backed
azure-core-amqptests after the temporary unblock in PR 7270. PinsTestAmqpBrokerto commit239aff0d87b2c19e1fa91636e0fc0f6ee6e9999afrom 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 targetsmainas 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
TestAmqpBrokerthrough its checked-innuget.cfsclean.config, buildsnet10.0with--no-restore, captures process logs, and polls the configured TCP endpoint for readiness.TEST_BROKER_ADDRESSthroughTestEnvandEnvVars, fatal missing-broker failures, and the prior 81 percent line coverage gate.Validation
git diff --checksdk/core/ci.ymlparsed withpowershell-yamlazure-core-amqp-testsCMake buildazure-core-amqpCTest cases passed against the brokerTestConnections.ConnectionOpenClosefailed as expected withoutTEST_BROKER_ADDRESS