Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust h2 schema to work with v2.0.x #4043

Closed
wants to merge 2 commits into from

Conversation

hpoettker
Copy link
Contributor

Spring Batch is currently not compatible with 2.0.x of H2. This creates problems for users that want to upgrade. However, the DDL for H2 can be adjusted such that it works with both the currently used 1.4 and 2.0.

When H2 is upgraded to 2.0.204, the test H2JobRepositoryIntegrationTests still fails as Spring JDBC is not compatible with 2.0.x. But this can be fixed in a similar way: spring-projects/spring-framework#27870

@hpoettker
Copy link
Contributor Author

As the required change in Spring JDBC has been merged, I amended the PR by upgrading the H2 dependency for the tests.

The new test is inspired by this commit by @sbrannen: spring-projects/spring-framework@75e1811

The same test also passes for the currently used H2 version 1.4.200.

I took the liberty to use some Java 17 features in the test. If you want to backport the PR to Spring Batch 4.x, please let me know and I'll change it to be Java 8-compliant.

@fmbenhassine fmbenhassine added this to the 5.0.0-M1 milestone Jan 9, 2022
@fmbenhassine fmbenhassine added the for: backport-to-4.3.x Issues that will be back-ported to the 4.3.x line label Jan 9, 2022
fmbenhassine pushed a commit that referenced this pull request Jan 10, 2022
Upgrade to H2 2.0.206

Issue #4043
@fmbenhassine
Copy link
Contributor

Thank you for this PR and for all your efforts across the portfolio! Much appreciated.

LGTM. Rebased and merged as e267e1f.

I took the liberty to use some Java 17 features in the test. If you want to backport the PR to Spring Batch 4.x, please let me know and I'll change it to be Java 8-compliant.

The adjustment should be backported to 4.x, I will take care of the required changes. Thank you!

@hpoettker hpoettker deleted the h2-v2-compatibility branch January 10, 2022 10:00
fmbenhassine pushed a commit that referenced this pull request Jan 10, 2022
fmbenhassine added a commit that referenced this pull request Jan 10, 2022
This commit adapts the code contributed
in #4043 to be Java 8-compatible with the
v4 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-4.3.x Issues that will be back-ported to the 4.3.x line in: core pr-for: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants