GetPastAssignees: Return past assignees as list

When formatting the past assignees as AccountInfo the ordered
LinkedHashSet that was retrieved from NoteDb was converted into an
unordered Set. Hence the results were returned in an undefined order.
This is the reason why the AssigneeIT#testGetPastAssignees() that
verified the correct order was flaky.

Returning the past assignees as set doesn't make sense since JSON
doesn't have sets and Gson converts it to a list anyway.

Change-Id: Ia78d8872d3e9e32928e7954b694c8f76ccdc8e0b
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-09-28 17:43:07 +02:00
parent 6c0b685cd7
commit cf99c9b773
4 changed files with 11 additions and 10 deletions

View File

@@ -155,7 +155,7 @@ public interface ChangeApi {
/**
* Get all past assignees.
*/
Set<AccountInfo> getPastAssignees() throws RestApiException;
List<AccountInfo> getPastAssignees() throws RestApiException;
/**
* Delete the assignee of a change.
@@ -361,7 +361,7 @@ public interface ChangeApi {
}
@Override
public Set<AccountInfo> getPastAssignees() throws RestApiException {
public List<AccountInfo> getPastAssignees() throws RestApiException {
throw new NotImplementedException();
}