-
Notifications
You must be signed in to change notification settings - Fork 944
.NET: Address Integration Concurrency Tests failure for V2 Agents #2421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET: Address Integration Concurrency Tests failure for V2 Agents #2421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes integration test concurrency issues for V2 Agents by ensuring each test creates uniquely named agent instances, preventing 404 errors when concurrent tests attempt to delete shared agents.
- Made
GenerateUniqueAgentNamemethod public for reuse across test classes - Updated four integration test methods to use dynamic unique agent names instead of hardcoded constants
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AIProjectClientFixture.cs | Changed GenerateUniqueAgentName visibility from private to public to allow external test classes to generate unique agent names |
| AIProjectClientCreateTests.cs | Updated four test methods (CreateAgent_CreatesAgentWithCorrectMetadataAsync, CreateAgent_CreatesAgentWithVectorStoresAsync, CreateAgent_CreatesAgentWithCodeInterpreterAsync, CreateAgent_CreatesAgentWithAIFunctionToolsAsync) to use dynamically generated unique agent names instead of hardcoded constant names, preventing concurrency conflicts |
Motivation and Context
When using V2, multiple integration tests running concurrently may delete existing agent instances still running and this can lead to 404 problems.
The fix adds the missing agent random naming for the specific crafted integration tests for the V2 agents that were missing this update.
Fixes