Fix failing tests on solr4

This commit is contained in:
Michael Suzuki
2017-03-01 07:54:58 +00:00
parent 4c3a994e8d
commit ace65aaeed
3 changed files with 5 additions and 3 deletions
@@ -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");
}