-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remove test-jar dependency with copied code #47917
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
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 pull request removes the test-jar dependency on azure-mgmt-resources (version 1.3.1-SNAPSHOT) by copying the necessary test infrastructure classes directly into the microsoft-azure-batch test codebase. The PR addresses a problematic snapshot dependency while maintaining the same test recording functionality.
Changes:
- Added seven new test infrastructure classes to support HTTP request/response recording and playback during testing
- Updated imports in
BatchIntegrationTestBase.javato reference the new local classes instead of the removed test-jar dependency - Removed the test-jar dependency from
pom.xmlandexternal_dependencies.txt
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestResourceNamerFactory.java | Factory class for creating TestResourceNamer instances to support deterministic resource naming during test playback |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestResourceNamer.java | Custom resource namer that integrates with the InterceptorManager for record/playback functionality |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestMode.java | Enum defining test execution modes (PLAYBACK and RECORD) |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestDelayProvider.java | Delay provider that skips delays during playback mode to speed up test execution |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/RecordedData.java | Data model for storing network call records and test variables |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/NetworkCallRecord.java | Data model representing a single HTTP request/response recording |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/InterceptorManager.java | Core infrastructure managing test recording and playback, including HTTP interception and session file management |
| sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/BatchIntegrationTestBase.java | Updated imports to use the new local recording infrastructure classes |
| sdk/batch/microsoft-azure-batch/pom.xml | Removed test-jar dependency on azure-mgmt-resources 1.3.1-SNAPSHOT |
| eng/versioning/external_dependencies.txt | Removed the entry for the test-jar dependency |
...crosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/NetworkCallRecord.java
Show resolved
Hide resolved
...crosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/NetworkCallRecord.java
Show resolved
Hide resolved
...rosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/InterceptorManager.java
Show resolved
Hide resolved
...crosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestResourceNamer.java
Show resolved
Hide resolved
...-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestResourceNamerFactory.java
Show resolved
Hide resolved
...rosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/InterceptorManager.java
Show resolved
Hide resolved
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestMode.java
Show resolved
Hide resolved
...crosoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/TestDelayProvider.java
Show resolved
Hide resolved
...ch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/recording/RecordedData.java
Show resolved
Hide resolved
|
/azp run java - batch - data - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run java - batch - data - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run java - batch - data - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/check-enforcer evaluate |
|
/check-enforcer override |
Description
Removes the snapshot test-jar for
azure-mgmt-resourceswith copied code from the package inmicrosoft-azure-batch.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines