mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -243,7 +243,7 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
txnHelper.doInTransaction(emptyStringCallback, true);
|
txnHelper.doInTransaction(emptyStringCallback, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPropertyDoubleValue() throws Exception
|
public void testPropertyDoubleValue() throws Exception
|
||||||
@@ -736,7 +736,7 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, true);
|
}, false);
|
||||||
// Create a well-known context ID
|
// Create a well-known context ID
|
||||||
final Long id = txnHelper.doInTransaction(new RetryingTransactionCallback<Long>()
|
final Long id = txnHelper.doInTransaction(new RetryingTransactionCallback<Long>()
|
||||||
{
|
{
|
||||||
@@ -744,7 +744,7 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
{
|
{
|
||||||
return propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa);
|
return propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa);
|
||||||
}
|
}
|
||||||
}, true);
|
}, false);
|
||||||
// Check that duplicates are disallowed
|
// Check that duplicates are disallowed
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -755,7 +755,7 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa);
|
propertyValueDAO.createPropertyUniqueContext("A", "AA", aaa);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, true);
|
}, false);
|
||||||
fail("Failed to throw exception creating duplicate property unique context");
|
fail("Failed to throw exception creating duplicate property unique context");
|
||||||
}
|
}
|
||||||
catch (PropertyUniqueConstraintViolation e)
|
catch (PropertyUniqueConstraintViolation e)
|
||||||
@@ -777,7 +777,7 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
propertyValueDAO.createPropertyUniqueContext("A", "AA", bbb);
|
propertyValueDAO.createPropertyUniqueContext("A", "AA", bbb);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, true);
|
}, false);
|
||||||
fail("Failed to throw exception creating duplicate property unique context");
|
fail("Failed to throw exception creating duplicate property unique context");
|
||||||
}
|
}
|
||||||
catch (PropertyUniqueConstraintViolation e)
|
catch (PropertyUniqueConstraintViolation e)
|
||||||
@@ -794,6 +794,6 @@ public class PropertyValueDAOTest extends TestCase
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, true);
|
}, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user