mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Remove extra sleep and double retry attempts
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringContextTests
|
||||
{
|
||||
/** The number of retries that a query will be tried before giving up. */
|
||||
protected static final int SEARCH_MAX_ATTEMPTS = 60;
|
||||
protected static final int SEARCH_MAX_ATTEMPTS = 120;
|
||||
|
||||
private static final Logger LOGGER = LogFactory.getLogger();
|
||||
|
||||
|
||||
+2
-10
@@ -27,12 +27,10 @@
|
||||
package org.alfresco.test.search.functional.searchServices.search;
|
||||
|
||||
import org.alfresco.test.search.functional.AbstractE2EFunctionalTest;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
||||
import static java.util.List.of;
|
||||
|
||||
@@ -92,10 +90,7 @@ public abstract class AbstractSearchServicesE2ETest extends AbstractE2EFunctiona
|
||||
of(file, file2, file3, file4).forEach(
|
||||
f -> dataContent.usingUser(testUser).usingSite(testSite).usingResource(folder).createContent(f)
|
||||
);
|
||||
|
||||
Utility.sleep(RETRY_INTERVAL, MAX_TIME, () -> {
|
||||
waitForMetadataIndexing(file4.getName(), true);
|
||||
});
|
||||
waitForMetadataIndexing(file4.getName(), true);
|
||||
}
|
||||
|
||||
protected FileModel createFileWithProvidedText(String filename, String providedText) throws InterruptedException
|
||||
@@ -105,10 +100,7 @@ public abstract class AbstractSearchServicesE2ETest extends AbstractE2EFunctiona
|
||||
FileModel uniqueFile = new FileModel(filename, title, description, FileType.TEXT_PLAIN,
|
||||
"The content " + providedText + " is a provided string");
|
||||
dataContent.usingUser(testUser).usingSite(testSite).usingResource(folder).createContent(uniqueFile);
|
||||
|
||||
Utility.sleep(RETRY_INTERVAL, MAX_TIME, () -> {
|
||||
Assert.assertTrue(waitForContentIndexing(providedText, true));
|
||||
});
|
||||
Assert.assertTrue(waitForContentIndexing(providedText, true));
|
||||
|
||||
return uniqueFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user