Fix SecondaryTableTest
This commit is contained in:
parent
7b107539db
commit
4b2e96c6e9
|
@ -6,6 +6,8 @@
|
|||
*/
|
||||
package org.hibernate.test.annotations.filter.secondarytable;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -19,12 +21,18 @@ public class SecondaryTableTest extends BaseCoreFunctionalTestCase {
|
|||
|
||||
@Override
|
||||
protected void prepareTest() throws Exception {
|
||||
openSession();
|
||||
insertUser("q@s.com", 21, false, "a1", "b");
|
||||
insertUser("r@s.com", 22, false, "a2", "b");
|
||||
insertUser("s@s.com", 23, true, "a3", "b");
|
||||
insertUser("t@s.com", 24, false, "a4", "b");
|
||||
session.flush();
|
||||
Session s = openSession();
|
||||
s.beginTransaction();
|
||||
try {
|
||||
insertUser( "q@s.com", 21, false, "a1", "b" );
|
||||
insertUser( "r@s.com", 22, false, "a2", "b" );
|
||||
insertUser( "s@s.com", 23, true, "a3", "b" );
|
||||
insertUser( "t@s.com", 24, false, "a4", "b" );
|
||||
session.flush();
|
||||
s.getTransaction().commit();
|
||||
}catch (Exception e){
|
||||
s.getTransaction().rollback();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue