mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
84345: Reverse Merge HEAD-BUG-FIX (5.0/Cloud) << About to revert HBF 78551 so need to revert this first >> 79277: Merged DEV to HEAD-BUG-FIX 79272 : MNT-11511 : All tags are not displayed in repository when the number of nodes taggable is over 1000 - Fixed failures on V5.0 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84656 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -195,7 +195,6 @@ public class TaggingServiceTest extends BaseWebScriptTest
|
||||
|
||||
public void testTagCountSearch() throws Exception
|
||||
{
|
||||
int TAGS_NUM = 1200;
|
||||
boolean removeTestFolder = false;
|
||||
boolean removeTagScope = false;
|
||||
FileInfo testFolderInfo = null;
|
||||
@@ -214,7 +213,7 @@ public class TaggingServiceTest extends BaseWebScriptTest
|
||||
//generate content with tag
|
||||
UserTransaction transaction = transactionService.getUserTransaction();
|
||||
transaction.begin();
|
||||
for (int i = 0; i < TAGS_NUM; i++)
|
||||
for (int i = 0; i < 1200; i++)
|
||||
{
|
||||
FileInfo file = this.fileFolderService.create(testFolderInfo.getNodeRef(), "testDoc" + i + ".txt", ContentModel.TYPE_CONTENT);
|
||||
this.taggingService.addTag(file.getNodeRef(), tagName);
|
||||
@@ -252,22 +251,12 @@ public class TaggingServiceTest extends BaseWebScriptTest
|
||||
}
|
||||
|
||||
// tag count via tagScope API
|
||||
int BREAK_COUNT = 80;
|
||||
int counter = 1;
|
||||
do
|
||||
{
|
||||
response = sendRequest(new GetRequest("api/tagscopes/node/" + testRoot.toString().replace(":/", "") + "/tags"), 200);
|
||||
jsonObj = new JSONObject(response.getContentAsString());
|
||||
tagsArr = jsonObj.getJSONArray("tags");
|
||||
number = getTagNumber(tagName, tagsArr);
|
||||
if (number == TAGS_NUM)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.sleep(500);
|
||||
}
|
||||
while (counter ++ <= BREAK_COUNT);
|
||||
assertEquals("Checking a search via tagScope API: Tag number must be "+ TAGS_NUM + ", because node is a tag scope.", TAGS_NUM, number);
|
||||
response = sendRequest(new GetRequest("api/tagscopes/node/" + testRoot.toString().replace(":/", "") + "/tags"), 200);
|
||||
jsonObj = new JSONObject(response.getContentAsString());
|
||||
tagsArr = jsonObj.getJSONArray("tags");
|
||||
number = getTagNumber(tagName, tagsArr);
|
||||
assertEquals("Checking a search via tagScope API: Tag number must be 1200, because node is a tag scope.", 1200, number);
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user