mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-6311 added API test to check that rm search results are ordered by security marks
This commit is contained in:
@@ -673,10 +673,10 @@ public class BaseRMRestTest extends RestTest
|
||||
*
|
||||
* @param user
|
||||
* @param term
|
||||
* @param sortby
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<String> searchForRMContentAsUser(UserModel user, String term, String expectedResult) throws Exception
|
||||
public List<String> searchForRMContentAsUser(UserModel user, String term, String sortby)
|
||||
{
|
||||
List<String> results = new ArrayList<>();
|
||||
// wait for solr indexing
|
||||
@@ -684,16 +684,6 @@ public class BaseRMRestTest extends RestTest
|
||||
int waitInMilliSeconds = 6000;
|
||||
while (counter < 3)
|
||||
{
|
||||
results = searchApi.searchForRecordsAsUser(user.getUsername(), user.getPassword(), term);
|
||||
if ((results != null && !results.isEmpty() && results.contains(expectedResult)))
|
||||
{
|
||||
break;
|
||||
} else
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
// double wait time to not overdo solr search
|
||||
waitInMilliSeconds = (waitInMilliSeconds * 2);
|
||||
synchronized (this)
|
||||
{
|
||||
try
|
||||
@@ -703,7 +693,17 @@ public class BaseRMRestTest extends RestTest
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
results = searchApi.searchForRecordsAsUser(user.getUsername(), user.getPassword(), term, sortby);
|
||||
if ((results != null && !results.isEmpty()))
|
||||
{
|
||||
break;
|
||||
} else
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
// double wait time to not overdo solr search
|
||||
waitInMilliSeconds = (waitInMilliSeconds * 2);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
Reference in New Issue
Block a user