Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<jraft.version>1.2.4</jraft.version>
<metrics.version>4.0.2</metrics.version>
<commons-io.version>2.4</commons-io.version>
<jetty.version>9.4.12.v20180830</jetty.version>
<jetty.version>[9.4.17.v20190418,)</jetty.version>
<main.user.dir>${user.dir}</main.user.dir>
<argLine>-Dnetwork_interface_denylist=docker0</argLine>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -146,18 +147,17 @@ public Map<String, Object> getPushSwitch() {
@Path("getDataInfoIdList")
@Produces(MediaType.APPLICATION_JSON)
public Collection<String> getDataInfoIdList() {
Collection<String> ret = new ArrayList<>();
Collection<String> ret = new HashSet<>();
ret.addAll(sessionInterests.getInterestDataInfoIds());
ret.addAll(sessionDataStore.getStoreDataInfoIds());
return sessionInterests.getInterestDataInfoIds();
return ret;
}

@GET
@Path("checkSumDataInfoIdList")
@Produces(MediaType.APPLICATION_JSON)
public int checkSumDataInfoIdList() {
return sessionInterests.getInterestDataInfoIds().hashCode()
+ sessionDataStore.getStoreDataInfoIds().hashCode();
return getDataInfoIdList().hashCode();
}

private void fillServerList(String type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ public void testGetDataInfoIdList() {
public void testCheckSumDataInfoIdList() {
int result = sessionChannel.getWebTarget().path("digest/checkSumDataInfoIdList")
.request(APPLICATION_JSON).get(int.class);
assertTrue(result > 0);
assertTrue(result != 0);
}
}