From 08329caf4be97e0f60f6619adb54ab18655a7c2e Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Wed, 20 Jan 2010 17:10:14 +0000 Subject: [PATCH] Fixed unit test's usage of read vs read-write txns - Failures during writes in the DAO when the test starts read-only txns - Must be merged back to V3.2 even though it's not failing there for some reason git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18185 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/domain/propval/PropertyValueDAOTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/java/org/alfresco/repo/domain/propval/PropertyValueDAOTest.java b/source/java/org/alfresco/repo/domain/propval/PropertyValueDAOTest.java index 213263648b..6abfd79fba 100644 --- a/source/java/org/alfresco/repo/domain/propval/PropertyValueDAOTest.java +++ b/source/java/org/alfresco/repo/domain/propval/PropertyValueDAOTest.java @@ -243,7 +243,7 @@ public class PropertyValueDAOTest extends TestCase return null; } }; - txnHelper.doInTransaction(emptyStringCallback, true); + txnHelper.doInTransaction(emptyStringCallback, false); } public void testPropertyDoubleValue() throws Exception @@ -736,7 +736,7 @@ public class PropertyValueDAOTest extends TestCase } return null; } - }, true); + }, false); // Create a well-known context ID final Long id = txnHelper.doInTransaction(new RetryingTransactionCallback() { @@ -744,7 +744,7 @@ public class PropertyValueDAOTest extends TestCase { return propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa); } - }, true); + }, false); // Check that duplicates are disallowed try { @@ -755,7 +755,7 @@ public class PropertyValueDAOTest extends TestCase propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa); return null; } - }, true); + }, false); fail("Failed to throw exception creating duplicate property unique context"); } catch (PropertyUniqueConstraintViolation e) @@ -777,7 +777,7 @@ public class PropertyValueDAOTest extends TestCase propertyValueDAO.createPropertyUniqueContext("A", "AA", bbb); return null; } - }, true); + }, false); fail("Failed to throw exception creating duplicate property unique context"); } catch (PropertyUniqueConstraintViolation e) @@ -794,6 +794,6 @@ public class PropertyValueDAOTest extends TestCase return null; } - }, true); + }, false); } }