imbajin commented on code in PR #2982:
URL: https://github.com/apache/hugegraph/pull/2982#discussion_r3360113073
##########
hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java:
##########
@@ -2683,6 +2683,28 @@ public void testQueryEdgesByIdWithGraphAPI() {
Assert.assertEquals(2, edges.size());
}
+ @Test
+ public void testQueryEdgesByNonConsecutiveDuplicateIds() {
+ HugeGraph graph = graph();
+ init18Edges();
+
+ List<Edge> allEdges = graph.traversal().E().toList();
+ Assert.assertTrue("need at least 2 edges", allEdges.size() >= 2);
+
+ Object id1 = allEdges.get(0).id();
+ Object id2 = allEdges.get(1).id();
+
+ // Graph API does not guarantee duplicate results for duplicate ids
+ List<Edge> edges = ImmutableList.copyOf(graph.edges(id1, id2, id1));
+ Assert.assertTrue(edges.size() >= 2);
Review Comment:
明白,这个精确断言放在 shared EdgeCoreTest 里确实不合适,因为 memory backend 当前会返回 2,CI failure
也验证了这一点。这个 core test 作为跨 backend smoke 保留弱断言可以接受;RocksDB-specific multiplicity
现在由 RocksDBTableQueryByIdsTest 的 iterator sequence/count 覆盖,我这边不再阻塞这个点。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]