Skip to content

Conversation

@BrendanWalsh
Copy link
Collaborator

Test previously required one specific greeting to be returned by the translation service. Now making it slightly more flexible.

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@github-actions
Copy link

Hey @BrendanWalsh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.91%. Comparing base (38b53c6) to head (27bc80b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2449      +/-   ##
==========================================
- Coverage   84.38%   83.91%   -0.48%     
==========================================
  Files         335      335              
  Lines       17690    17688       -2     
  Branches     1619     1610       -9     
==========================================
- Hits        14928    14842      -86     
- Misses       2762     2846      +84     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a 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 addresses flakiness in translation service tests by replacing strict equality assertions with more flexible containment checks. The changes account for variation in translation service responses (e.g., different but equivalent Chinese greetings like "早上好" vs "早安"), which helps prevent test failures due to non-deterministic API behavior rather than actual bugs.

Key Changes:

  • Replaced exact string matches (=== or ==) with flexible assertions using contains() checks that accept multiple valid translation alternatives
  • Added intermediate variables to store results before asserting on them for better readability
  • Introduced alternative acceptable translations for Chinese phrases (e.g., "嗨" or "你好" for greetings, "再见" or "拜拜" for goodbye)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@microsoft microsoft deleted a comment from Copilot AI Nov 25, 2025
@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh BrendanWalsh merged commit bcb6d37 into master Nov 25, 2025
66 of 70 checks passed
@BrendanWalsh BrendanWalsh deleted the brwals/translation branch November 25, 2025 06:33
BrendanWalsh added a commit that referenced this pull request Dec 2, 2025
* fix: Make translation test less flaky

* Make another check more flexible

* increased flexibility

* fix scalastyle
BrendanWalsh added a commit to BrendanWalsh/SynapseML that referenced this pull request Dec 5, 2025
* fix: Make translation test less flaky

* Make another check more flexible

* increased flexibility

* fix scalastyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants