-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Transcription test cleanup and Test Proxy bug work around #47641
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
Transcription test cleanup and Test Proxy bug work around #47641
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 refactors the test code in the Azure AI Speech Transcription SDK to improve maintainability and adds timeout configuration to work around a Test Proxy performance issue that causes intermittent CI failures. The refactoring consolidates duplicated test logic, simplifies test methods, and uses static resource loading for better test performance.
Key changes:
- Refactored test base class to use helper methods and static audio file loading
- Simplified test methods by removing boilerplate code
- Added Maven Surefire plugin configuration with increased timeout values (300 seconds) to work around Test Proxy performance issues
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| TranscriptionClientTestBase.java | Refactored to use static audio file loading, removed test lifecycle methods, added helper methods (fromAudioFile, createMultipartBody), simplified client configuration |
| TranscriptionClientTest.java | Simplified all test methods to use new helper methods, added BeforeEach setup, removed repetitive client creation and method name extraction code |
| TranscriptionAsyncClientTest.java | Similar simplification as sync tests, proper use of StepVerifier for async validation, consolidated error handling tests |
| pom.xml | Added maven-surefire-plugin configuration with extended timeout values (AZURE_REQUEST_WRITE_TIMEOUT, AZURE_REQUEST_RESPONSE_TIMEOUT, AZURE_REQUEST_READ_TIMEOUT set to 300000ms) |
| assets.json | Formatting change from single-line to multi-line JSON |
...anscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionClientTestBase.java
Show resolved
Hide resolved
...anscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionClientTestBase.java
Show resolved
Hide resolved
...nscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionAsyncClientTest.java
Show resolved
Hide resolved
...nscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionAsyncClientTest.java
Show resolved
Hide resolved
...anscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionClientTestBase.java
Show resolved
Hide resolved
...nscription/src/test/java/com/azure/ai/speech/transcription/TranscriptionAsyncClientTest.java
Show resolved
Hide resolved
|
/check-enforcer evaluate |
|
/check-enforcer override |
Description
Cleans up the test code in Transcription and adds in a request timeout increase to work around a performance issue in Test Proxy that causes CI to fail intermittently due to resource contention and responses from Test Proxy taking longer than 60 seconds.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines