mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Fix failing tests on solr4
This commit is contained in:
@@ -58,6 +58,7 @@ public class AbstractSearchTest extends RestTest
|
||||
* |-- pangram.txt
|
||||
* |-- cars.pdf
|
||||
*/
|
||||
nodesBuilder = restClient.authenticateUser(userModel).withCoreAPI().usingNode(ContentModel.my()).defineNodes();
|
||||
FolderModel folder = new FolderModel(SEARCH_DATA_SAMPLE_FOLDER);
|
||||
dataContent.usingSite(siteModel).createFolder(folder);
|
||||
//Create files
|
||||
|
||||
@@ -35,7 +35,7 @@ public class FingerPrintTest extends AbstractSearchTest
|
||||
* The data prep should have loaded a file
|
||||
* identical to the one loaded as part of this test.
|
||||
* @throws Exception
|
||||
*/
|
||||
*/
|
||||
public void search() throws Exception
|
||||
{
|
||||
String uuid = file.getNodeRefWithoutVersion();
|
||||
|
||||
@@ -38,7 +38,8 @@ public class SearchTest extends AbstractSearchTest
|
||||
nodes.assertThat().entriesListIsNotEmpty();
|
||||
|
||||
SearchNodeModel entity = nodes.getEntryByIndex(0);
|
||||
Assert.assertEquals(entity.getSearch().getScore(), 1);
|
||||
entity.assertThat().field("search").contains("score");
|
||||
entity.getSearch().assertThat().field("score").isNotEmpty();
|
||||
entity.assertThat().field("name").contains("pangram.txt");
|
||||
|
||||
nodes = query("car");
|
||||
@@ -46,8 +47,8 @@ public class SearchTest extends AbstractSearchTest
|
||||
entity = nodes.getEntryByIndex(0);
|
||||
|
||||
nodes.assertThat().entriesListIsNotEmpty();
|
||||
Assert.assertEquals(entity.getSearch().getScore(), 1);
|
||||
entity.assertThat().field("search").contains("score");
|
||||
entity.getSearch().assertThat().field("score").isNotEmpty();
|
||||
entity.assertThat().field("name").contains("cars.txt");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user