MartijnVisser opened a new pull request, #250:
URL: https://github.com/apache/flink-connector-jdbc/pull/250
## What is the purpose of the change
The XA connection tests run only on Derby, and H2, which replaces it in
FLINK-40730, drops a prepared transaction when its connection closes. This adds
PostgreSQL, so FLINK-40730 can drop the Derby subclasses.
## Brief change log
- `SimpleXaConnectionProviderPrepareTest` replaces both
`testEmptyTransaction`s
- The two XA test classes run on Derby and PostgreSQL, roll back leftover
prepared transactions and close their `assertBooks` connection
- `testRecoverFindsTransactionPreparedOnAnotherConnection`
- `PostgresDatabase` no longer keeps a stale URL after a container
restart. The other `*Database` classes are a follow-up
## Verifying this change
This change added tests and can be verified as follows:
- 12/12 on Derby and PostgreSQL 16, also with one fork
- On `H2XaTestBase` the two-step commits and the recover test fail
- Breaking the `XA_RDONLY` branch fails the unit test
- `./mvnw verify -pl flink-connector-jdbc-postgres
-Dflink.forkCountUnitTest=2` fails `PostgresDialectTest` on main, not here
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency, including
`flink.version` or a database driver version such as `mysql.version` /
`postgres.version`): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)` or `@Experimental`, or are the Table options or the JDBC
dialect SPI (`JdbcDialect` / `JdbcFactory`) changed: no
- Checkpointed state, its serializers, or exactly-once delivery (source
splits, enumerator state, writer state, committables, XA transactions): no
- The per-record code paths (split reader, `JdbcOutputFormat`, dialect
statement building; performance sensitive): no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
- If the docs changed, are both `docs/content` and `docs/content.zh`
updated? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (Claude Code)
Generated-by: Claude Code (Claude Opus 5.5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]