mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Search-2142: Added missing call to getModel to get the shard method and count
This commit is contained in:
+8
-8
@@ -626,14 +626,13 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
{
|
||||
RestShardInfoModelCollection info = getShardInfo();
|
||||
|
||||
return shardingMethod =
|
||||
ofNullable(info)
|
||||
.map(RestShardInfoModelCollection::getEntries)
|
||||
.map(Collection::iterator)
|
||||
.filter(Iterator::hasNext)
|
||||
.map(Iterator::next)
|
||||
.map(RestShardInfoModel::getShardMethod)
|
||||
.orElseThrow( () -> new RuntimeException("Cannot retrieve the shard method in use."));
|
||||
return shardingMethod = ofNullable(info)
|
||||
.map(RestShardInfoModelCollection::getEntries)
|
||||
.map(Collection::iterator).filter(Iterator::hasNext)
|
||||
.map(Iterator::next)
|
||||
.map(RestShardInfoModel::getModel)
|
||||
.map(RestShardInfoModel::getShardMethod)
|
||||
.orElseThrow(() -> new RuntimeException("Cannot retrieve the shard method in use."));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -651,6 +650,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
.map(Collection::iterator)
|
||||
.filter(Iterator::hasNext)
|
||||
.map(Iterator::next)
|
||||
.map(RestShardInfoModel::getModel)
|
||||
.map(RestShardInfoModel::getNumberOfShards)
|
||||
.orElseThrow( () -> new RuntimeException("Cannot retrieve the number of shards registered."));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user