From c4713882c232d1ba1538e75a8826c9f9679897ff Mon Sep 17 00:00:00 2001 From: "yuxuan.wang" <48981679+Salieri-004@users.noreply.github.com> Date: Fri, 2 Feb 2024 10:43:30 +0800 Subject: [PATCH] fix compare node (#5816) * fix compare node * remove @skip mark --- tests/common/comparator.py | 9 ++++----- tests/tck/features/path/NoLoop.feature | 7 +------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/common/comparator.py b/tests/common/comparator.py index d496a38dcfa..ae884fd4858 100644 --- a/tests/common/comparator.py +++ b/tests/common/comparator.py @@ -295,21 +295,20 @@ def compare_vid(self, lid: Value, rid: Value) -> bool: return False def compare_node(self, lhs: Vertex, rhs: Vertex): - rtags = [] + rtags = [] if rhs.tags is None else rhs.tags if self._strict: assert rhs.vid is not None if not self.compare_vid(lhs.vid, rhs.vid): return False - if rhs.tags is None or len(lhs.tags) != len(rhs.tags): + if len(lhs.tags) != len(rtags): return False - rtags = rhs.tags else: if rhs.vid is not None: if not self.compare_vid(lhs.vid, rhs.vid): return False - if rhs.tags is not None and len(lhs.tags) < len(rhs.tags): + if len(lhs.tags) < len(rtags): return False - rtags = [] if rhs.tags is None else rhs.tags + for tag in rtags: ltag = [ [lt.name, lt.props] for lt in lhs.tags if self.bstr(tag.name) == lt.name diff --git a/tests/tck/features/path/NoLoop.feature b/tests/tck/features/path/NoLoop.feature index 67e25890209..26c8d2ba229 100644 --- a/tests/tck/features/path/NoLoop.feature +++ b/tests/tck/features/path/NoLoop.feature @@ -243,7 +243,6 @@ Feature: NoLoop Path | [[:like "LaMarcus Aldridge"->"Tim Duncan" @0 {}], [:like "Tony Parker"->"LaMarcus Aldridge" @0 {}]] | | [[:like "Manu Ginobili"->"Tim Duncan" @0 {}], [:like "Tony Parker"->"Manu Ginobili" @0 {}]] | - @skip Scenario: Query with NO LOOP on a node without self-loop When executing query: """ @@ -261,25 +260,22 @@ Feature: NoLoop Path """ CREATE TAG Person(name string); """ - And wait 1 seconds Then the execution should be successful When executing query: """ CREATE EDGE Link(); """ - And wait 1 seconds Then the execution should be successful + And wait 6 seconds When executing query: """ INSERT VERTEX Person(name) VALUES "nodea":("Node A"); """ - And wait 1 seconds Then the execution should be successful When executing query: """ INSERT EDGE Link() VALUES "nodea" -> "nodea":(); """ - And wait 1 seconds Then the execution should be successful When executing query: """ @@ -298,5 +294,4 @@ Feature: NoLoop Path """ DROP SPACE TestNoLoopSpace """ - And wait 1 seconds Then the execution should be successful