mirror of https://github.com/apache/openjpa.git
testcase wasn't committing/closing some EMs, so use new closeEM() helper
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1022163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
54e64edaa2
commit
e175b242f9
|
@ -66,6 +66,7 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
assertFalse(gv.getUuidhex().equals(gv2.getUuidhex()));
|
assertFalse(gv.getUuidhex().equals(gv2.getUuidhex()));
|
||||||
assertFalse(gv.getUuidT4hex().equals(gv2.getUuidT4hex()));
|
assertFalse(gv.getUuidT4hex().equals(gv2.getUuidT4hex()));
|
||||||
assertFalse(gv.getUuidT4string().equals(gv2.getUuidT4string()));
|
assertFalse(gv.getUuidT4string().equals(gv2.getUuidT4string()));
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testInitialValues() {
|
public void testInitialValues() {
|
||||||
|
@ -83,6 +84,8 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
} catch (EntityExistsException eee) {
|
} catch (EntityExistsException eee) {
|
||||||
// also ok
|
// also ok
|
||||||
return;
|
return;
|
||||||
|
} finally {
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should not get here...
|
// should not get here...
|
||||||
|
@ -105,6 +108,8 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
} catch (EntityExistsException eee) {
|
} catch (EntityExistsException eee) {
|
||||||
// also ok
|
// also ok
|
||||||
return;
|
return;
|
||||||
|
} finally {
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should not get here...
|
// should not get here...
|
||||||
|
@ -124,6 +129,8 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
} catch (InvalidStateException ise) {
|
} catch (InvalidStateException ise) {
|
||||||
// expected result
|
// expected result
|
||||||
return;
|
return;
|
||||||
|
} finally {
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should not get here...
|
// should not get here...
|
||||||
|
@ -154,6 +161,7 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
em.getTransaction().commit();
|
em.getTransaction().commit();
|
||||||
|
|
||||||
assertNotEquals(0, gv.getCustomSeqWithIndirectionField());
|
assertNotEquals(0, gv.getCustomSeqWithIndirectionField());
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testUUIDGenerators() {
|
public void testUUIDGenerators() {
|
||||||
|
@ -199,6 +207,7 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
||||||
assertTrue(gv.getField() == gv2.getField());
|
assertTrue(gv.getField() == gv2.getField());
|
||||||
assertTrue(gv.getUuidhex().equals(gv2.getUuidhex()));
|
assertTrue(gv.getUuidhex().equals(gv2.getUuidhex()));
|
||||||
assertTrue(gv.getUuidT4hex().equals(gv2.getUuidT4hex()));
|
assertTrue(gv.getUuidT4hex().equals(gv2.getUuidT4hex()));
|
||||||
|
closeEM(em);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue