Merge branch 'feature/SEARCH-1681_ShardingOnTheCITests' into 'master'

Feature/search 1681 sharding on the ci tests

See merge request search_discovery/insightengine!394
This commit is contained in:
Keerat Lalia
2020-02-26 10:37:48 +00:00
2 changed files with 6 additions and 2 deletions
@@ -62,7 +62,9 @@ public class ShardInfoTest extends AbstractE2EFunctionalTest
RestShardInfoModel model = shardInfoModel.getModel();
assertEquals(model.getTemplate(), "rerank");
assertEquals(model.getMode(), "MASTER");
assertEquals(model.getShardMethod(), "DB_ID");
List<String> shardingMethods = Arrays.asList("DB_ID", "DB_ID_RANGE", "EXPLICIT_ID", "ACL_ID", "MOD_ACL_ID", "DATE", "PROPERTY");
String shardingMethod = model.getShardMethod();
assertTrue(shardingMethods.contains(shardingMethod), "Unexpected Sharding Method Found: " + shardingMethod);
assertTrue(model.getHasContent());
assertTrue(stores.contains(model.getStores()));
@@ -79,7 +81,7 @@ public class ShardInfoTest extends AbstractE2EFunctionalTest
assertTrue(baseUrls.contains(instance.getBaseUrl()));
// TODO: Ideally Solr Host and Port should be Parameterised
assertEquals(instance.getHost(), "search");
assertNotNull(instance.getHost(), "The solr host is not present");
assertEquals(instance.getPort().intValue(), 8983);
assertEquals(instance.getState(), "ACTIVE");
assertEquals(instance.getMode(), "MASTER");
@@ -322,6 +322,8 @@ public class StatsSearchTest extends AbstractSearchServicesE2ETest
response.getContext().assertThat().field("facets").isNotEmpty();
RestGenericFacetResponseModel facetResponseModel = response.getContext().getFacets().get(0);
facetResponseModel.assertThat().field("type").is("stats");
// TODO : Change back to facetResponseModel.assertThat().field("label").is(label);
// when https://issues.alfresco.com/jira/browse/SEARCH-2125 is fixed
facetResponseModel.assertThat().field("label").is(label);
RestGenericBucketModel bucket = facetResponseModel.getBuckets().get(0);
List<RestGenericMetricModel> metrics = bucket.getMetrics();