Skip to content

Conversation

hpoettker
Copy link
Contributor

Partially resolves #821.

Spring Cloud Task is currently not compatible with version 2.0.x of H2. Using strict syntax in the H2PagingQueryProvider allows the query to be used with both H2 versions.

When H2 is upgraded to 2.0.204, e.g. the SimpleTaskExplorerTests fail without the change and succeed with it.

For full compatibility, also Spring JDBC and Spring Batch will need to make adjustments:

@hpoettker
Copy link
Contributor Author

I added two tests that are inspired by this commit by @sbrannen: spring-projects/spring-framework@75e1811

As the required change in Spring JDBC has been merged, the tests in spring-cloud-task-core now also pass when Spring JDBC is upgraded to 5.3.15-SNAPSHOT and H2 to 2.0.206. The notable exception is SimpleTaskAutoConfigurationTests::testRepositoryNotInitialized which checks for a very particular exception message.

@sbrannen
Copy link

sbrannen commented Jan 8, 2022

I added two tests that are inspired by this commit by @sbrannen: spring-projects/spring-framework@75e1811

Glad I inspired you @hpoettker! And... you inspired me as well: see spring-projects/spring-framework@51d263b.

@hpoettker
Copy link
Contributor Author

I switched to @EnumSource here as well. And simplified H2TaskRepositoryIntegrationTests a bit. 😄

@hpoettker
Copy link
Contributor Author

Spring JDBC and Spring Batch now have snapshot versions with the required changes. I updated them in the build and set the H2 version to 2.0.206, and the build is green. 🚀 😄

@cppwfs
Copy link
Collaborator

cppwfs commented Jan 10, 2022

Thank you @hpoettker for this contribution!
LGTM.
The only changes I will make to the PR on merge are:

  • We will let the Spring Boot Bom determine the version of H2 so I will remove that entry in the dependency management.
  • I will also update the testRepositoryNotInitialized so that it will only test for the exception and not the message.

@cppwfs cppwfs self-assigned this Jan 10, 2022
@cppwfs
Copy link
Collaborator

cppwfs commented Jan 11, 2022

Squashed Polished Merged
Thank you for this contribution!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot Use H2 Version 2.0.202

3 participants