Add test coverage for decoding pending reviewers
Pending reviewers are a stored field in the change index. This test helps ensure that change index implementations properly support decoding data stored with the pendingreviewers and pendingreviewersbyemail fields. This new test revealed an error in ElasticChangeIndex, which is now fixed. Bug: Issue 6832 Change-Id: Iefa81e4a7c7eab029196d27e38e03ff8488286c1
This commit is contained in:
@@ -357,7 +357,8 @@ class ElasticChangeIndex extends AbstractElasticIndex<Change.Id, ChangeData>
|
||||
if (source.get(ChangeField.PENDING_REVIEWER.getName()) != null) {
|
||||
cd.setPendingReviewers(
|
||||
ChangeField.parseReviewerFieldValues(
|
||||
FluentIterable.from(source.get(ChangeField.REVIEWER.getName()).getAsJsonArray())
|
||||
FluentIterable.from(
|
||||
source.get(ChangeField.PENDING_REVIEWER.getName()).getAsJsonArray())
|
||||
.transform(JsonElement::getAsString)));
|
||||
} else if (fields.contains(ChangeField.PENDING_REVIEWER.getName())) {
|
||||
cd.setPendingReviewers(ReviewerSet.empty());
|
||||
|
Reference in New Issue
Block a user