Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# limitations under the License.

[versions]
junit-jupiter = "5.11.4"
junit-jupiter = "5.13.4"
assertj = "3.27.3"
google-errorprone-core = "2.36.0"
nullaway = "0.12.4"
jspecify = "1.0.0"
hibernate-orm = "6.6.9.Final"
hibernate-orm = "6.6.25.Final"
mongo-java-driver-sync = "5.3.1"
slf4j-api = "2.0.16"
logback-classic = "1.5.16"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,17 +597,6 @@ static class ItemWithArrayAndCollectionValuesOfStructAggregateEmbeddablesHavingA

@Nested
class Unsupported {
/**
* The {@link ClassCastException} caught here manifests a Hibernate ORM bug. The issue goes away if the
* {@link ItemWithBoxedBytesArrayValue#bytes} field is removed. Otherwise, the behavior of this test should have
* been equivalent to {@link #testBytesCollectionValue()}.
*/
@Test
void testBoxedBytesArrayValue() {
var item = new ItemWithBoxedBytesArrayValue(1, new byte[] {1}, new Byte[] {2});
assertThatThrownBy(() -> sessionFactoryScope.inTransaction(session -> session.persist(item)))
.isInstanceOf(ClassCastException.class);
}

@Test
void testBytesCollectionValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.Parameter;
import org.junit.jupiter.params.ParameterizedClass;
import org.junit.jupiter.params.provider.ValueSource;

@ExtendWith(MongoExtension.class)
@ParameterizedClass
@ValueSource(booleans = {true, false})
class MongoPreparedStatementIntegrationTests {

@AutoClose
Expand All @@ -63,6 +68,9 @@ class MongoPreparedStatementIntegrationTests {
@AutoClose
private Session session;

@Parameter
private boolean autoCommit;

@BeforeAll
static void beforeAll() {
sessionFactory = new Configuration().buildSessionFactory();
Expand Down Expand Up @@ -405,6 +413,7 @@ private void doWorkAwareOfAutoCommit(Work work) {
}

void doAwareOfAutoCommit(Connection connection, SqlExecutable work) throws SQLException {
doWithSpecifiedAutoCommit(false, connection, () -> doAndTerminateTransaction(connection, work));
doWithSpecifiedAutoCommit(
autoCommit, connection, autoCommit ? work : () -> doAndTerminateTransaction(connection, work));
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.Parameter;
import org.junit.jupiter.params.ParameterizedClass;
import org.junit.jupiter.params.provider.ValueSource;

@ExtendWith(MongoExtension.class)
@ParameterizedClass
@ValueSource(booleans = {true, false})
class MongoStatementIntegrationTests {

@AutoClose
Expand All @@ -54,6 +59,9 @@ class MongoStatementIntegrationTests {
@AutoClose
private Session session;

@Parameter
boolean autoCommit;

@BeforeAll
static void beforeAll() {
sessionFactory = new Configuration().buildSessionFactory();
Expand Down Expand Up @@ -278,7 +286,8 @@ private void doWorkAwareOfAutoCommit(Work work) {
}

void doAwareOfAutoCommit(Connection connection, SqlExecutable work) throws SQLException {
doWithSpecifiedAutoCommit(false, connection, () -> doAndTerminateTransaction(connection, work));
doWithSpecifiedAutoCommit(
autoCommit, connection, autoCommit ? work : () -> doAndTerminateTransaction(connection, work));
}

static void doWithSpecifiedAutoCommit(boolean autoCommit, Connection connection, SqlExecutable work)
Expand Down

This file was deleted.