Author: adrianc
Date: Wed Nov 5 15:30:47 2014
New Revision: 1636896
URL: http://svn.apache.org/r1636896
Log:
Try to fix intermittent entity test failures.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=1636896&r1=1636895&r2=1636896&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
Wed Nov 5 15:30:47 2014
@@ -1215,6 +1215,8 @@ public class EntityTestSuite extends Ent
// Must use the default delegator because the deserialized
GenericValue can't
// find the randomized one.
Delegator localDelegator = DelegatorFactory.getDelegator("default");
+ TransactionUtil.begin();
+ localDelegator.create("TestingType", "testingTypeId", "TEST-UPDATE-1",
"description", "Testing Type #Update-1");
GenericValue testValue = localDelegator.create("Testing", "testingId",
"JSON_TEST", "testingTypeId", "TEST-UPDATE-1",
"description", "Testing JSON Converters", "testingSize",
(long) 123, "testingDate",
new Timestamp(System.currentTimeMillis()));
@@ -1225,7 +1227,7 @@ public class EntityTestSuite extends Ent
null);
assertNotNull("GenericValue converted from JSON not null",
convertedValue);
assertEquals("GenericValue converted from JSON equals original value",
testValue, convertedValue);
- testValue.remove();
+ TransactionUtil.rollback();
}
private final class TestObserver implements Observer {