From 7a64470de1d38413f4dc6e92417d735fb9d126ac Mon Sep 17 00:00:00 2001 From: Jan Schatteman Date: Mon, 17 Nov 2025 22:53:33 +0100 Subject: [PATCH] HHH-19847 - Drop JUnit 4 support: removed some leftover junit4 references from agroal Signed-off-by: Jan Schatteman --- .../test/agroal/AgroalSkipAutoCommitTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hibernate-agroal/src/test/java/org/hibernate/test/agroal/AgroalSkipAutoCommitTest.java b/hibernate-agroal/src/test/java/org/hibernate/test/agroal/AgroalSkipAutoCommitTest.java index 11c3eff6f8a7..84816e4899e3 100644 --- a/hibernate-agroal/src/test/java/org/hibernate/test/agroal/AgroalSkipAutoCommitTest.java +++ b/hibernate-agroal/src/test/java/org/hibernate/test/agroal/AgroalSkipAutoCommitTest.java @@ -4,6 +4,9 @@ */ package org.hibernate.test.agroal; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; + import org.hibernate.test.agroal.util.PreparedStatementSpyConnectionProvider; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.ServiceRegistry; @@ -12,8 +15,6 @@ import org.hibernate.testing.orm.junit.Setting; import org.hibernate.testing.orm.junit.SettingProvider; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; import org.junit.jupiter.api.Test; import java.sql.Connection; @@ -23,8 +24,8 @@ import static org.hibernate.cfg.JdbcSettings.AUTOCOMMIT; import static org.hibernate.cfg.JdbcSettings.CONNECTION_PROVIDER; import static org.hibernate.cfg.JdbcSettings.CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Vlad Mihalcea @@ -75,7 +76,7 @@ private void verifyConnections() { Connection.class.getMethod( "setAutoCommit", boolean.class ), connections.get( 0 ) ); - assertTrue( "setAutoCommit should never be called", setAutoCommitCalls.isEmpty() ); + assertTrue( setAutoCommitCalls.isEmpty(), "setAutoCommit should never be called" ); } catch (NoSuchMethodException e) { throw new RuntimeException( e );