HHH-10521 - Fix Java 6 not compliant tests

This commit is contained in:
Andrea Boriero 2016-02-11 14:46:08 +00:00
parent 81b1baa8c4
commit e09a9f9aca
4 changed files with 8 additions and 3 deletions

View File

@ -16,6 +16,7 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/**
* @author Andrea Boriero
@ -57,6 +58,7 @@ public class SetSubselectTest extends BaseCoreFunctionalTestCase {
if ( s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
s.getTransaction().rollback();
}
fail( e.getMessage() );
}
finally {
s.close();

View File

@ -23,6 +23,7 @@ import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/**
* @author Andrea Boriero
@ -49,7 +50,7 @@ public class LocalDateTest extends BaseNonConfigCoreFunctionalTestCase {
if ( s.getTransaction() != null && s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
s.getTransaction().rollback();
}
throw e;
fail( e.getMessage() );
}
finally {
s.close();

View File

@ -26,6 +26,7 @@ import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/**
* @author Andrea Boriero
@ -144,7 +145,7 @@ public class OffsetDateTimeTest extends BaseNonConfigCoreFunctionalTestCase {
if ( s.getTransaction() != null && s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
s.getTransaction().rollback();
}
throw e;
fail( e.getMessage() );
}
finally {
s.close();

View File

@ -25,6 +25,7 @@ import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/**
* @author Andrea Boriero
@ -141,7 +142,7 @@ public class ZonedDateTimeTest extends BaseNonConfigCoreFunctionalTestCase {
if ( s.getTransaction() != null && s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
s.getTransaction().rollback();
}
throw e;
fail( e.getMessage() );
}
finally {
s.close();