Skip to content

Port FX ResultSet tests to state-machine based JUnit5 tests (legacyFx) - #2912

Merged
Ananya Garg (Ananya2) merged 5 commits into
mainfrom
user/anagarg/resultset-fx-test
Mar 25, 2026
Merged

Port FX ResultSet tests to state-machine based JUnit5 tests (legacyFx)#2912
Ananya Garg (Ananya2) merged 5 commits into
mainfrom
user/anagarg/resultset-fx-test

Conversation

@Ananya2

Copy link
Copy Markdown
Contributor

This PR ports FX ResultSet functional scenarios to the JUnit 5 state-machine testing framework under the legacyFx tag. The migration replaces legacy FX tests with structured model-based tests that systematically explore ResultSet state transitions and behaviors, improving maintainability and coverage.

The update expands ResultSetState with additional state keys to track insert-row state, row deletion status, updatability, scrollability, connection and statement references, row counts, and table metadata. It also introduces new action classes in ResultSetActions to model ResultSet navigation, row operations, update workflows, and positional checks. ResultSetStateTest has been rewritten using nested test structures to organize scenarios covering model exploration, scanning behavior, movers, row operations, updates, getters, updaters, fetch configuration, findColumn, cascading close behavior, and edge cases.

@codecov

codecov Bot commented Mar 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.64%. Comparing base (415984c) to head (50b6767).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2912      +/-   ##
============================================
+ Coverage     60.61%   60.64%   +0.02%     
- Complexity     4911     4915       +4     
============================================
  Files           151      151              
  Lines         35000    35000              
  Branches       5854     5854              
============================================
+ Hits          21216    21224       +8     
+ Misses        10939    10934       -5     
+ Partials       2845     2842       -3     

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

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 ResultSet functional scenarios into the JUnit 5 state-machine testing framework under the legacyFx tag, expanding the modeled ResultSet state and action space to cover more navigation, row operations, update flows, and close semantics.

Changes:

  • Rewrites ResultSetStateTest into a nested JUnit 5 structure with model runs plus many scenario-focused tests (scan/movers/rowers/updaters/findColumn/fetch/close).
  • Expands ResultSetState to track additional ResultSet metadata and flags (insert-row, deleted-row, updatability, scrollability, etc.).
  • Extends ResultSetActions with additional modeled actions (relative navigation, insert-row toggles, updates, deletes, refresh, positional checks).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/test/java/com/microsoft/sqlserver/jdbc/statemachinetest/resultset/ResultSetStateTest.java Large JUnit 5 rewrite adding nested scenario tests and state-machine model runs for ResultSet behaviors.
src/test/java/com/microsoft/sqlserver/jdbc/statemachinetest/resultset/ResultSetState.java Adds new state keys to support richer ResultSet modeling (insert-row, deleted-row, updatability/scrollability, etc.).
src/test/java/com/microsoft/sqlserver/jdbc/statemachinetest/resultset/ResultSetActions.java Adds/updates state-machine actions to exercise additional ResultSet operations and update workflows.

@Ananya2
Ananya Garg (Ananya2) force-pushed the user/anagarg/resultset-fx-test branch from a7b3dcf to 6a22a49 Compare March 19, 2026 10:23
@Ananya2
Ananya Garg (Ananya2) merged commit 1aaabca into main Mar 25, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Closed/Merged PRs in MSSQL JDBC Mar 25, 2026
@Ananya2 Ananya Garg (Ananya2) added this to the 13.5.1 milestone Mar 25, 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.

5 participants