Purushottam Sinha created FLINK-41367:
-----------------------------------------
Summary: JDBC: Test SQL Server dialect on SQL Server 2025, not
retired Azure SQL Edge; cover XA
Key: FLINK-41367
URL: https://issues.apache.org/jira/browse/FLINK-41367
Project: Flink
Issue Type: Improvement
Components: Connectors / JDBC
Reporter: Purushottam Sinha
*Problem*
The SQL Server dialect is tested against Azure SQL Edge, which Microsoft
retired on 2025-09-30, rather than SQL Server. SQL Server XA, which
exactly-once sinks rely on, is set up in the test container but never tested.
*Evidence*
* {{flink-connector-jdbc-sqlserver/.../testutils/SqlServerImages.java:24-25}}
uses {{mcr.microsoft.com/azure-sql-edge}}.
* {{SqlServerDatabase.java:38}} calls {{withXa()}} ({{sp_sqljdbc_xa_install}}),
but {{SimpleXaConnectionProviderTest}} only has Derby and PostgreSQL subclasses.
* With a SQL Server subclass,
{{testRecoverFindsTransactionPreparedOnAnotherConnection}} fails: {{recover()}}
returns the driver's own {{Xid}} type, which never equals a {{TransactionId}},
so {{contains(xid)}} fails and {{doesNotContain(xid)}} passes without checking
anything.
*Proposed fix*
* Use {{mcr.microsoft.com/mssql/server:2025-CU10-ubuntu-24.04}}.
* Add {{SqlServerSimpleXaConnectionProviderTest}}.
* In {{SimpleXaConnectionProviderTest}}, compare recovered XIDs by format ID,
global transaction ID and branch qualifier.
*Acceptance*
* The SQL Server dialect and XA tests run on SQL Server 2025 in CI.
* The Derby and PostgreSQL XA tests still pass.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)