Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

specs, add test for LongRunningRpcOperation #242

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Mar 22, 2023

Cadl Ranch Contribution Checklist:

  • I have written a scenario spec
  • I have meaningful @scenario names. Someone can look at the list of scenarios and understand what I'm covering.
  • I have written a mock API
  • I have used @scenarioDocs for extra scenario description and to tell people how to pass my mock api check.

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2023

⚠️ No Changeset found

Latest commit: 5f5356f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +144 to +153
Expected status code: 202
Expected response header: operation-location={endpoint}/different-poll-result/jobs/operations/operation1
Expected response header: location={endpoint}/different-poll-result/jobs/job1
Expected response body:
```json
{
"operationId": "operation1",
"status": "InProgress"
}
```
Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a case of polling location/result is different from final resource location/result.

OperationResourcePollingStrategy in Java supports this legacy scenario. However it is possible not all SDK supports it.

Also, the result of getLroMetadata API call would be confused on the logicalResult or finalStep (I am not yet sure whether it means tsp need to written differently, or there is bug in getLroMetadata).

Hence it likely need adjustment, after the LongRunningRpcOperation been put to Azure.Core.

@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review March 24, 2023 04:04
@iscai-msft iscai-msft merged commit fa62906 into specs_add-azure-core-lro Mar 24, 2023
@iscai-msft iscai-msft deleted the specs_add-azure-core-lro-rpc branch March 24, 2023 18:20
@lmazuel lmazuel mentioned this pull request Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants