Enhance code coverage - #2712
Merged
Divang Sharma (divang) merged 13 commits intoNov 3, 2025
Merged
Conversation
Divang Sharma (divang)
commented
Jul 18, 2025
Contributor
- Enhanced test cases for SQLServerConnectionTest and SQLServerDatabaseMetaData
…t classes (#2711) * Enhanced test cases for SQLServerConnectionTest and SQLServerDatabaseMetaData Co-authored-by: Divang Sharma <divangsharma@microsoft.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2712 +/- ##
============================================
+ Coverage 52.26% 56.27% +4.01%
- Complexity 4152 4517 +365
============================================
Files 149 149
Lines 34378 34378
Branches 5734 5734
============================================
+ Hits 17966 19347 +1381
+ Misses 13918 12405 -1513
- Partials 2494 2626 +132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Improved the code coverage of SQLServerConnectionTest * Fixed improved code coverage test cases * Removed testValidateMaxSQLLoginName and testFederatedAuthentication_UserCase test cases. Those are failing in different env pipeline. * Added logging.propertied in test resource and enhanced code coverage * Improved more test coverage * Fixed test cases * Reverted logging.properties from test resource and enhanced more test cases * Increased memory used by maven-surefire-plugin * removed logging.properties file from test resources * Enhanced test cases for SQLServerDatabaseMetaData * Fixed bug * Reverted the unnecessary changes * Removed test cases which are breaking in different env * Removed SecurityManager related test case, due to ADO pipeline failure * Removed testValidateMaxSQLLoginName due to ADO pipeline failure * Enhanced SQLServerBulkCopy code coverage --------- Co-authored-by: Divang Sharma <divangsharma@microsoft.com>
* Enhance test coverage for SQLServerCallableStatement * fix junit failure for datetime data type * Increased test coverage, and fixed junit failure * refactored test case * Fix JDK 8 incompatibility
* Enhance test coverage for SQLServerResultSet * Updated tags on test
) * JSON datatype support (#2558) * JSON datatype implementation. Co-authored-by: lilgreenbird <v-susanh@microsoft.com> Co-authored-by: Divang Sharma <divangsharma@microsoft.com> Co-authored-by: Ananya Garg <anagarg@microsoft.com> Co-authored-by: Muskan Gupta <muskgupta@microsoft.com> Co-authored-by: Ananya Garg <ananya20.garg@gmail.com> * Add new trusted AKV URLs for FR and DE (#2708) * Add new trusted AKV URLs for FR and DE * Update SQLServerColumnEncryptionAzureKeyVaultProvider.java * Enhance code coverage for SQLServerConnectionPoolProxy * Updated test to fix failures --------- Co-authored-by: Divang Sharma <divang.s@gmail.com> Co-authored-by: lilgreenbird <v-susanh@microsoft.com> Co-authored-by: Divang Sharma <divangsharma@microsoft.com> Co-authored-by: Ananya Garg <anagarg@microsoft.com> Co-authored-by: Ananya Garg <ananya20.garg@gmail.com> Co-authored-by: Mahendra Chavan <machavan@microsoft.com>
* JSON datatype support (#2558) * JSON datatype implementation. Co-authored-by: lilgreenbird <v-susanh@microsoft.com> Co-authored-by: Divang Sharma <divangsharma@microsoft.com> Co-authored-by: Ananya Garg <anagarg@microsoft.com> Co-authored-by: Muskan Gupta <muskgupta@microsoft.com> Co-authored-by: Ananya Garg <ananya20.garg@gmail.com> * Add new trusted AKV URLs for FR and DE (#2708) * Add new trusted AKV URLs for FR and DE * Update SQLServerColumnEncryptionAzureKeyVaultProvider.java * Updates for 13.1.1 preview release (#2715) * Updates for 13.1.1 preview release * Fixed PR link * Removed unnecessary space * Enhance test coverage for SQLServerSQLXML file. --------- Co-authored-by: Divang Sharma <divang.s@gmail.com> Co-authored-by: lilgreenbird <v-susanh@microsoft.com> Co-authored-by: Divang Sharma <divangsharma@microsoft.com> Co-authored-by: Muskan Gupta <muskgupta@microsoft.com> Co-authored-by: Mahendra Chavan <machavan@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances test coverage for SQLServerConnectionTest and SQLServerDatabaseMetaData by adding comprehensive JSON data type support and expanding test cases for various JDBC functionality.
Key Changes:
- Added comprehensive JSON data type support with new test classes, enum values, and CSV test data
- Enhanced PreparedStatement testing with extensive setter method coverage and batch execution scenarios
- Expanded ResultSet testing to include getter/setter methods, stream operations, and JSON data handling
- Added extensive DatabaseMetaData testing for capability methods, version information, and result set support
Reviewed Changes
Copilot reviewed 48 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| BulkCopyCSVTestInputWithJson.csv | Added CSV test data with JSON content for bulk copy operations |
| SqlTypeValue.java | Added JSON enum value for SQL type testing framework |
| SqlType.java | Enhanced with vendor type number support and constructor for JSON type |
| SqlJson.java | New SQL JSON type class for test framework |
| Constants.java | Added JSONTest tag for JSON-specific test categorization |
| RegressionTest.java | Added comprehensive JSON query testing with CRUD operations |
| PreparedStatementTest.java | Extensive testing of setter methods, batch operations, and edge cases |
| TVPTypesTest.java | Added JSON support for Table-Valued Parameters |
| ResultSetTest.java | Comprehensive getter/setter testing and JSON data handling |
| BatchExecutionWithBulkCopyTest.java | Added JSON support for bulk copy operations |
| JSONFunctionTest.java | New comprehensive test class for SQL Server JSON functions |
| DatabaseMetaDataTest.java | Enhanced metadata testing with capability and version methods |
Comments suppressed due to low confidence (6)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Ananya Garg (Ananya2)
approved these changes
Nov 3, 2025
Muskan Gupta (muskan124947)
approved these changes
Nov 3, 2025
Mahendra Chavan (machavan)
approved these changes
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.