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

Bump com.h2database:h2 from 2.3.230 to 2.3.232 #42502

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<httpasync.version>4.1.5</httpasync.version>
<cronutils.version>9.2.1</cronutils.version>
<quartz.version>2.3.2</quartz.version>
<h2.version>2.3.230</h2.version> <!-- When updating, needs to be matched in io.quarkus.hibernate.orm.runtime.config.DialectVersions -->
<h2.version>2.3.232</h2.version> <!-- When updating, needs to be matched in io.quarkus.hibernate.orm.runtime.config.DialectVersions -->
<postgresql-jdbc.version>42.7.3</postgresql-jdbc.version>
<mariadb-jdbc.version>3.4.1</mariadb-jdbc.version>
<mysql-jdbc.version>8.3.0</mysql-jdbc.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static final class Defaults {

// This must be aligned on the H2 version in the Quarkus BOM
// This must never be removed
public static final String H2 = "2.3.230";
public static final String H2 = "2.3.232";

private Defaults() {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package io.quarkus.it.jpa.h2;

import java.io.IOException;
import java.sql.SQLException;

import javax.sql.DataSource;

import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
Expand All @@ -13,16 +16,27 @@

import io.quarkus.hibernate.orm.runtime.config.DialectVersions;

@Path("/dialect/version")
@Path("/dialect/")
@Produces(MediaType.TEXT_PLAIN)
public class DialectEndpoint {
@Inject
SessionFactory sessionFactory;
@Inject
DataSource dataSource;

@GET
public String test() throws IOException {
@Path("version")
public String version() throws IOException {
var version = sessionFactory.unwrap(SessionFactoryImplementor.class).getJdbcServices().getDialect().getVersion();
return DialectVersions.toString(version);
}

@GET
@Path("actual-db-version")
public String actualDbVersion() throws IOException, SQLException {
try (var conn = dataSource.getConnection()) {
return conn.getMetaData().getDatabaseProductVersion();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@
public class DialectTest {

/**
* This is important to avoid https://github.com/quarkusio/quarkus/issues/1886
* This is important for backwards compatibility reasons:
* we want to keep using at least the same version as before by default.
*/
@Test
public void version() {
String version = RestAssured.when().get("/dialect/version").then().extract().body().asString();
assertThat(version).startsWith(DialectVersions.Defaults.H2);
}

/**
* This is important to avoid https://github.com/quarkusio/quarkus/issues/1886
*/
@Test
public void actualDbVersion() {
String version = RestAssured.when().get("/dialect/actual-db-version").then().extract().body().asString();
// Can't use "equal" as the returned string includes trailing information (build date, ...)
assertThat(version).startsWith(DialectVersions.Defaults.H2);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package io.quarkus.it.jpa.h2;

import java.io.IOException;
import java.sql.SQLException;

import javax.sql.DataSource;

import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
Expand All @@ -13,16 +16,27 @@

import io.quarkus.hibernate.orm.runtime.config.DialectVersions;

@Path("/dialect/version")
@Path("/dialect/")
@Produces(MediaType.TEXT_PLAIN)
public class DialectEndpoint {
@Inject
SessionFactory sessionFactory;
@Inject
DataSource dataSource;

@GET
public String test() throws IOException {
@Path("version")
public String version() throws IOException {
var version = sessionFactory.unwrap(SessionFactoryImplementor.class).getJdbcServices().getDialect().getVersion();
return DialectVersions.toString(version);
}

@GET
@Path("actual-db-version")
public String actualDbVersion() throws IOException, SQLException {
try (var conn = dataSource.getConnection()) {
return conn.getMetaData().getDatabaseProductVersion();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@
public class DialectTest {

/**
* This is important to avoid https://github.com/quarkusio/quarkus/issues/1886
* This is important for backwards compatibility reasons:
* we want to keep using at least the same version as before by default.
*/
@Test
public void version() {
String version = RestAssured.when().get("/dialect/version").then().extract().body().asString();
assertThat(version).startsWith(DialectVersions.Defaults.H2);
}

/**
* This is important to avoid https://github.com/quarkusio/quarkus/issues/1886
*/
@Test
public void actualDbVersion() {
String version = RestAssured.when().get("/dialect/actual-db-version").then().extract().body().asString();
// Can't use "equal" as the returned string includes trailing information (build date, ...)
assertThat(version).startsWith(DialectVersions.Defaults.H2);
}

}
Loading