[Retire FX] Port functional test scenarios for globalization - #2924
Merged
Muskan Gupta (muskan124947) merged 4 commits intoApr 2, 2026
Conversation
Copilot started reviewing on behalf of
Muskan Gupta (muskan124947)
March 26, 2026 09:41
View session
Muskan Gupta (muskan124947)
requested review from
Copilot
and removed request for
Copilot
March 26, 2026 09:47
Contributor
There was a problem hiding this comment.
Pull request overview
Ports legacy FX globalization functional scenarios into the JUnit test suite to validate Unicode/UTF-16 round-trips, locale/calendar behavior, and collation handling in the JDBC driver.
Changes:
- Added UTF-16 round-trip parameterized test coverage across multiple JDBC send/receive APIs.
- Added locale/query/case-sensitivity/calendar globalization tests and shared test-data providers.
- Added collation-focused tests including per-collation DB creation scenarios and server-collation discovery.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
src/test/java/com/microsoft/sqlserver/jdbc/globalization/GlobalizationUTF16Test.java |
New UTF-16 round-trip test exercising multiple setter/getter paths. |
src/test/java/com/microsoft/sqlserver/jdbc/globalization/GlobalizationTestData.java |
New shared globalization datasets + parameter sources for the new tests. |
src/test/java/com/microsoft/sqlserver/jdbc/globalization/GlobalizationLocaleTest.java |
New tests for Unicode identifiers, locale invariance, case sensitivity, and Calendar-based temporal access. |
src/test/java/com/microsoft/sqlserver/jdbc/globalization/GlobalizationCollationTest.java |
New collation coverage including DB-collation creation, _SC collation discovery, and Turkish CP1254 scenario. |
Copilot started reviewing on behalf of
Muskan Gupta (muskan124947)
March 26, 2026 09:48
View session
Muskan Gupta (muskan124947)
requested review from
Ananya Garg (Ananya2),
Divang Sharma (divang) and
Mahendra Chavan (machavan)
March 26, 2026 10:04
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2924 +/- ##
============================================
- Coverage 60.71% 60.70% -0.02%
+ Complexity 4953 4932 -21
============================================
Files 151 151
Lines 35022 35022
Branches 5856 5856
============================================
- Hits 21265 21261 -4
+ Misses 10953 10949 -4
- Partials 2804 2812 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Mahendra Chavan (machavan)
approved these changes
Apr 1, 2026
Divang Sharma (divang)
approved these changes
Apr 2, 2026
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.
Migrate FX Globalization Tests to JUnit 5
Migrates the legacy FX globalization test cases to JUnit 5 parameterized tests in a new
globalization/package undersrc/test/java/com/microsoft/sqlserver/jdbc/.Files Added
GlobalizationTestData.java@MethodSourceprovidersGlobalizationCollationTest.javaGlobalizationLocaleTest.javaGlobalizationUTF16Test.javaFX Test Case Mapping
testCollationSetterAndGettertestServerCollationRoundTriptestTurkishCP1254CharactertestCollationColumnSizestestGlobalizedIdentifierstestPureUnicodeLiteraltestCaseSensitivitytestCalendarLocaletestCalendarOutputParamstestGetStringWithLocaletestUTF16RoundTripTest Scenario Counts
testCollationSetterAndGettertestServerCollationRoundTrip_SCcollations fromsys.fn_helpcollations()testTurkishCP1254Character@TesttestCollationColumnSizestestGlobalizedIdentifierstestPureUnicodeLiteraltestCaseSensitivitytestCalendarLocaletestCalendarOutputParamstestGetStringWithLocaleLocale.getAvailableLocales()testUTF16RoundTripLanguages Covered (10)
English, German, Breton, Turkish, Russian, Arabic, Japanese, Chinese (China), Chinese (Taiwan), Chinese (Hong Kong)
Excluded Parameters (by design)
?substitution in VARCHAR — not a driver bugDate.valueOf()creates millis in JVM timezone; GMT Calendar reinterpretation shifts the date when JVM is not UTC — timezone-sensitive, not a driver bugfindColumnuses Java standard case-folding which doesn't implement Turkish-I rules (known FX BUG 402731)setAsciiStream/updateAsciiStreamencode as US-ASCII (7-bit) — non-ASCII characters (BMP, SURROGATE, COMBINING) are inherently lossy, not valid for UTF-16 round-trip testingResource Cleanup
finallyblocksGlobalizationCollationTesttracks created databases in a safety-net list with@AfterAllcleanupGlobalizationLocaleTestuses null-safe@AfterAllwithconnection.isClosed()checkfinallyblocks include catch clauses for best-effort cleanup