mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Tweak a very old unit test for ETHREEOH-220 as advised by Derek, by wrapping one part in a retrying helper
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23299 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -644,12 +644,22 @@ public class TaggingServiceImplTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public void testETHREEOH_220() throws Exception
|
public void testETHREEOH_220() throws Exception
|
||||||
{
|
{
|
||||||
UserTransaction tx = this.transactionService.getUserTransaction();
|
// Add tag scope to a folder, then add a non-ASCII (unicode)
|
||||||
tx.begin();
|
// tag onto the folder
|
||||||
|
transactionService.getRetryingTransactionHelper().doInTransaction(
|
||||||
|
new RetryingTransactionCallback<Void>()
|
||||||
|
{
|
||||||
|
public Void execute() throws Throwable
|
||||||
|
{
|
||||||
|
taggingService.addTagScope(folder);
|
||||||
|
taggingService.addTag(folder, TAG_I18N);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, false, true
|
||||||
|
);
|
||||||
|
|
||||||
this.taggingService.addTagScope(this.folder);
|
// Wait for the tagging service to process the tag change
|
||||||
this.taggingService.addTag(this.folder, TAG_I18N);
|
UserTransaction tx = asyncOccurs.awaitExecution(null);
|
||||||
tx = asyncOccurs.awaitExecution(tx);
|
|
||||||
|
|
||||||
// Get the tag from the node
|
// Get the tag from the node
|
||||||
List<String> tags = this.taggingService.getTags(this.folder);
|
List<String> tags = this.taggingService.getTags(this.folder);
|
||||||
@@ -1336,6 +1346,7 @@ public class TaggingServiceImplTest extends TestCase
|
|||||||
{
|
{
|
||||||
synchronized (waitForExecutionLock) {
|
synchronized (waitForExecutionLock) {
|
||||||
// Have things begin working
|
// Have things begin working
|
||||||
|
if(tx != null)
|
||||||
tx.commit();
|
tx.commit();
|
||||||
|
|
||||||
// Always wait 25ms
|
// Always wait 25ms
|
||||||
|
Reference in New Issue
Block a user