http-client-java, include client.tsp in list for multi-service tests#9385
Merged
weidongxu-microsoft merged 7 commits intomicrosoft:mainfrom Jan 19, 2026
Conversation
Contributor
|
No changes needing a change description found. |
Collaborator
|
You can try these changes here
|
packages/http-client-java/generator/http-client-generator-test/Generate.ps1
Show resolved
Hide resolved
…els (microsoft#9389) ## Plan for Adding ARM Tests - [x] Create `ArmMultiServiceOlderVersionsTests.java` for multiserviceolderversions/combined scenario - Test exercises Disks and VirtualMachines resources - Test uses CombinedManager with DiskProperties and VirtualMachineProperties - Test passes successfully ✓ - [x] Create `ArmMultiServiceSharedModelsTests.java` for multiservicesharedmodels/combined scenario - Test exercises StorageAccounts and VirtualMachines resources - Test uses CombinedManager with StorageAccountProperties, VirtualMachineProperties, and SharedMetadata - Test structure matches mockapi expectations - **Test disabled due to code generation bug** - @disabled annotation added - [x] Verify tests compile successfully ✓ - [x] Run tests with Spector server to validate correctness ## Test Results **ArmMultiServiceOlderVersionsTests**: ✅ PASSING - Successfully creates and retrieves Disk resources at `/Microsoft.Compute/disksOld/` - Successfully creates and retrieves VirtualMachine resources at `/Microsoft.Compute/virtualMachinesOld/` - Uses correct API versions and request/response payloads matching mockapi **ArmMultiServiceSharedModelsTests**:⚠️ DISABLED (Code Generation Bug) - Test is correctly structured per mockapi specifications - VirtualMachines operations work correctly (Microsoft.Compute provider) - StorageAccounts operations fail because generated code incorrectly uses `/Microsoft.Compute/storageAccounts/` instead of `/Microsoft.Storage/storageAccounts/` - Root cause: The emitter doesn't properly handle multiple provider namespaces when generating combined clients - Test disabled with `@Disabled("route in code is wrong: /Microsoft.Compute/storageAccounts/account1")` annotation - The test will pass once the code generation is fixed and client code is regenerated ## Summary Two test files have been added following the same pattern as the reference `ArmMultipleServiceTests`. Both tests are structured correctly and will exercise the combined client APIs once all code generation issues are resolved. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>http-client-java, add test for azure/resourcemanager/multiserviceolderversions/combined and azure/resourcemanager/multiservicesharedmodels/combined</issue_title> > <issue_description>add test for azure/resourcemanager/multiserviceolderversions/combined and azure/resourcemanager/multiservicesharedmodels/combined > > tsp test source is > https://github.com/Azure/typespec-azure/tree/main/packages/azure-http-specs/specs/azure/resource-manager/multi-service-older-versions > https://github.com/Azure/typespec-azure/tree/main/packages/azure-http-specs/specs/azure/resource-manager/multi-service-shared-models > > Do not include "combined" in package for the test. Use an "Arm" prefix on Java test file name. > > ref test in https://github.com/microsoft/typespec/tree/9ef954e5e16edf9e3a6a541153d830f339ee40a5/packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/resourcemanager/multiservice as example</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes microsoft#9388 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
…est-in-multiple-service' into http-client-java_fix-missing-test-in-multiple-service
XiaofeiCao
approved these changes
Jan 19, 2026
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.
also had copilot added test 6d7c3ea
disabled one case due to issue in Azure.ResourceManager