Skip to content
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

[Document Translation] Bug in the tests #31948

Open
HarshaNalluru opened this issue Nov 26, 2024 · 0 comments
Open

[Document Translation] Bug in the tests #31948

HarshaNalluru opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Translator test-reliability Issue that causes tests to be unreliable

Comments

@HarshaNalluru
Copy link
Member

HarshaNalluru commented Nov 26, 2024

Bug in the test

  • Test file: sdk\translation\ai-translation-document-rest\test\public\node\documentTranslationTest.spec.ts
  • Test name: "Supported And UnSupported Files"

There is an unhandled rejection in the test mentioned above. It went unnoticed until now because mocha did not complain about it.

In #31918 by @mpodwysocki, upon migrating to vitest, we noticed the error - unhandled rejection.

Image

Pipeline failure from the PR https://dev.azure.com/azure-sdk/public/_build/results?buildId=4326091&view=logs&j=f3d84248-526b-5c53-c1d9-c908a2c076cb&t=a08660e7-0c74-50b6-45ab-0cb70a5776f5&l=166

TODO

  1. Change the following call to add await to surface the error
    Image
  2. Fix the error by updating the tests
  3. Regenerate the recording and update the assets file
     
    cc @hamshavathimunibyraiah
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 26, 2024
@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. Cognitive - Translator test-reliability Issue that causes tests to be unreliable labels Nov 26, 2024
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 26, 2024
mpodwysocki added a commit that referenced this issue Feb 27, 2025
…#33220)

### Packages impacted by this PR

- @azure-rest/ai-translation-document
- @azure-rest/ai-translation-text

### Issues associated with this PR

- #32416

### Describe the problem that is addressed by this PR

Updates all projects under `translation` to use snippets extraction.
Note this disables non-functioning tests that need to be recorded under
the `documentTranslationTest.spec.ts` and
`translationFilterTest.spec.ts`. Noted in the issue #31948 that the
tests need to be re-recorded.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Translator test-reliability Issue that causes tests to be unreliable
Projects
None yet
Development

No branches or pull requests

4 participants