fixed bad test code

This commit is contained in:
Steve Ebersole 2016-02-08 16:21:10 -06:00
parent f4b5f2c649
commit 62276504f7
1 changed files with 2 additions and 3 deletions

View File

@ -16,11 +16,10 @@ import org.hibernate.annotations.Nationalized;
import org.hibernate.dialect.Oracle10gDialect; import org.hibernate.dialect.Oracle10gDialect;
import org.hibernate.resource.transaction.spi.TransactionStatus; import org.hibernate.resource.transaction.spi.TransactionStatus;
import org.junit.Test;
import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
/** /**
* @author Andrea Boriero * @author Andrea Boriero
@ -44,7 +43,7 @@ public class StringNationalizedTest extends BaseCoreFunctionalTestCase {
s.save( ne ); s.save( ne );
s.getTransaction().commit(); s.getTransaction().commit();
} }
catch (Exception e) { catch (RuntimeException e) {
if ( s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) { if ( s.getTransaction().getStatus() == TransactionStatus.ACTIVE ) {
s.getTransaction().rollback(); s.getTransaction().rollback();
} }