Skip to content

Port functional test scenarios for sparse columns to JUnit - #2922

Merged
Ananya Garg (Ananya2) merged 3 commits into
mainfrom
user/anagarg/sparsecols-legacyfx-tests
Mar 31, 2026
Merged

Port functional test scenarios for sparse columns to JUnit#2922
Ananya Garg (Ananya2) merged 3 commits into
mainfrom
user/anagarg/sparsecols-legacyfx-tests

Conversation

@Ananya2

Copy link
Copy Markdown
Contributor

Summary

Ports all functional test (FX) scenarios for sparse columns from the legacy test framework to JUnit 5 in SparseTest.java, organized as @Nested test classes.

Changes

Adds 45 JUnit 5 tests across 5 nested test classes covering all FX sparse column scenarios:

  • SparseCreationFxTests (9 tests) — Table creation with/without column set, sparse-only, wide table, illegal type, and column limit errors
  • SparseInsertionFxTests (12 tests) — Named column and column set XML insertions across all table configurations, >1024 column insert, and named+colset conflict error
  • SparseSelectFxTests (11 tests) — SELECT after creation/insertion, SELECT * column set behavior, >4096 column error, isSparseColumnSet boundary validation, and selectMethod=cursor
  • SparseMetaDataFxTests (3 tests) — ParameterMetaData nullability and type validation with/without column set and wide tables
  • SparseUpdateFxTests (10 tests) — Named column and column set XML updates across all table configurations

Testing

All tests are tagged with @Tag(Constants.legacyFx) and @Tag(Constants.xAzureSQLDW).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports legacy FX functional scenarios for SQL Server sparse columns into the JUnit 5 suite (SparseTest.java), organizing coverage into @Nested classes.

Changes:

  • Adds JUnit 5 nested test groups for sparse column creation, insertion, selection, metadata, and update scenarios.
  • Covers wide-table scenarios (e.g., >1024 sparse columns), column set XML behavior, and cursor selectMethod behavior.
  • Adds error-path validations for invalid sparse types and column-count limits.

Comment thread src/test/java/com/microsoft/sqlserver/jdbc/datatypes/SparseTest.java Outdated
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/datatypes/SparseTest.java Outdated
@codecov

codecov Bot commented Mar 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.56%. Comparing base (0bdf85b) to head (8608843).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2922      +/-   ##
============================================
- Coverage     60.71%   60.56%   -0.16%     
+ Complexity     4953     4910      -43     
============================================
  Files           151      151              
  Lines         35022    35022              
  Branches       5856     5856              
============================================
- Hits          21265    21212      -53     
- Misses        10953    10959       +6     
- Partials       2804     2851      +47     

☔ 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.

Comment thread src/test/java/com/microsoft/sqlserver/jdbc/datatypes/SparseTest.java Outdated
@Ananya2
Ananya Garg (Ananya2) merged commit 106cb7c into main Mar 31, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Closed/Merged PRs in MSSQL JDBC Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed/Merged PRs

Development

Successfully merging this pull request may close these issues.

4 participants