diff --git a/src/test/java/com/baidu/hugegraph/api/traverser/SingleSourceShortestPathApiTest.java b/src/test/java/com/baidu/hugegraph/api/traverser/SingleSourceShortestPathApiTest.java index e494b461..bb92b214 100644 --- a/src/test/java/com/baidu/hugegraph/api/traverser/SingleSourceShortestPathApiTest.java +++ b/src/test/java/com/baidu/hugegraph/api/traverser/SingleSourceShortestPathApiTest.java @@ -442,8 +442,8 @@ public void testSingleSourceShortestPathWithDegree() { public void testSingleSourceShortestPathWithLimit() { WeightedPaths weightedPaths = singleSourceShortestPathAPI.get( "A", Direction.BOTH, null, "weight", - -1, 0, -1, 10, false); - Assert.assertEquals(10, weightedPaths.paths().size()); + -1, 0, -1, 11, false); + Assert.assertEquals(11, weightedPaths.paths().size()); WeightedPath.Path path = weightedPaths.paths().get("B"); Assert.assertEquals(0.2D, path.weight(), Double.MIN_VALUE); @@ -462,6 +462,11 @@ public void testSingleSourceShortestPathWithLimit() { Assert.assertEquals(0.8D, path.weight(), Double.MIN_VALUE); Assert.assertEquals(ImmutableList.of("A", "E", "F"), path.vertices()); + path = weightedPaths.paths().get("L"); + Assert.assertEquals(0.8D, path.weight(), Double.MIN_VALUE); + Assert.assertEquals(ImmutableList.of("A", "H", "I", "J", "Z", "L"), + path.vertices()); + path = weightedPaths.paths().get("G"); Assert.assertEquals(0.6D, path.weight(), Double.MIN_VALUE); Assert.assertEquals(ImmutableList.of("A", "H", "I", "J", "Z", "G"),