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
|
||||
{
|
||||
UserTransaction tx = this.transactionService.getUserTransaction();
|
||||
tx.begin();
|
||||
// Add tag scope to a folder, then add a non-ASCII (unicode)
|
||||
// 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);
|
||||
this.taggingService.addTag(this.folder, TAG_I18N);
|
||||
tx = asyncOccurs.awaitExecution(tx);
|
||||
// Wait for the tagging service to process the tag change
|
||||
UserTransaction tx = asyncOccurs.awaitExecution(null);
|
||||
|
||||
// Get the tag from the node
|
||||
List<String> tags = this.taggingService.getTags(this.folder);
|
||||
@@ -1336,7 +1346,8 @@ public class TaggingServiceImplTest extends TestCase
|
||||
{
|
||||
synchronized (waitForExecutionLock) {
|
||||
// Have things begin working
|
||||
tx.commit();
|
||||
if(tx != null)
|
||||
tx.commit();
|
||||
|
||||
// Always wait 25ms
|
||||
waitForExecutionLock.wait(25);
|
||||
|
Reference in New Issue
Block a user