diff --git a/pom.xml b/pom.xml index 2822dd6c9..1b15dc405 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ 1.2.4 4.0.2 2.4 - 9.4.12.v20180830 + [9.4.17.v20190418,) ${user.dir} -Dnetwork_interface_denylist=docker0 diff --git a/server/server/session/src/main/java/com/alipay/sofa/registry/server/session/resource/SessionDigestResource.java b/server/server/session/src/main/java/com/alipay/sofa/registry/server/session/resource/SessionDigestResource.java index 74f25329b..46d408b4f 100644 --- a/server/server/session/src/main/java/com/alipay/sofa/registry/server/session/resource/SessionDigestResource.java +++ b/server/server/session/src/main/java/com/alipay/sofa/registry/server/session/resource/SessionDigestResource.java @@ -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; @@ -146,18 +147,17 @@ public Map getPushSwitch() { @Path("getDataInfoIdList") @Produces(MediaType.APPLICATION_JSON) public Collection getDataInfoIdList() { - Collection ret = new ArrayList<>(); + Collection 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, diff --git a/test/src/test/java/com/alipay/sofa/registry/test/resource/session/SessionDigestResourceTest.java b/test/src/test/java/com/alipay/sofa/registry/test/resource/session/SessionDigestResourceTest.java index 96b1c144f..2c0b7f28c 100644 --- a/test/src/test/java/com/alipay/sofa/registry/test/resource/session/SessionDigestResourceTest.java +++ b/test/src/test/java/com/alipay/sofa/registry/test/resource/session/SessionDigestResourceTest.java @@ -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); } }