From 0cd85529445adb9a033e8ef6e7f3e0a64532c8d6 Mon Sep 17 00:00:00 2001 From: heroicNeZha <25311962+heroicNeZha@users.noreply.github.com> Date: Mon, 15 Nov 2021 11:03:56 +0800 Subject: [PATCH 1/4] fix - tck contains is invalid --- tests/common/comparator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/common/comparator.py b/tests/common/comparator.py index b17e8018f4b..b77870fe4f4 100644 --- a/tests/common/comparator.py +++ b/tests/common/comparator.py @@ -49,6 +49,7 @@ def s(self, b: bytes) -> str: def _whether_return(self, cmp: bool) -> bool: return ((self._contains == CmpType.EQUAL and not cmp) + or (self._contains == CmpType.CONTAINS and not cmp) or (self._contains == CmpType.NOT_CONTAINS and cmp)) def compare(self, resp: DataSet, expect: DataSet): From 224e2296b0680ced8ac23a6c53164251630e7c9b Mon Sep 17 00:00:00 2001 From: heroicNeZha <25311962+heroicNeZha@users.noreply.github.com> Date: Fri, 19 Nov 2021 15:53:40 +0800 Subject: [PATCH 2/4] test - Modify test cases that failed after bug-fix --- tests/tck/features/admin/Hosts.feature | 7 +-- tests/tck/features/index/TagEdgeIndex.feature | 44 +++++++++---------- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/tests/tck/features/admin/Hosts.feature b/tests/tck/features/admin/Hosts.feature index cc176c72d0f..5ee39e2c93b 100644 --- a/tests/tck/features/admin/Hosts.feature +++ b/tests/tck/features/admin/Hosts.feature @@ -1,6 +1,7 @@ # Copyright (c) 2021 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. +@li Feature: Admin hosts Scenario: Show hosts @@ -17,21 +18,21 @@ Feature: Admin hosts """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | EMPTY | + | /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | '' | When executing query: """ SHOW HOSTS META; """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | EMPTY | + | /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | '' | When executing query: """ SHOW HOSTS STORAGE; """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | EMPTY | + | /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | '' | Scenario: Create space When executing query: diff --git a/tests/tck/features/index/TagEdgeIndex.feature b/tests/tck/features/index/TagEdgeIndex.feature index 2412243eb56..7935e9bf151 100644 --- a/tests/tck/features/index/TagEdgeIndex.feature +++ b/tests/tck/features/index/TagEdgeIndex.feature @@ -13,17 +13,17 @@ Feature: tag and edge index tests from pytest CREATE TAG tag_1(col1 string, col2 int, col3 double, col4 timestamp); CREATE EDGE edge_1(col1 string, col2 int, col3 double, col4 timestamp); INSERT VERTEX - tag_1(col1, col2, col3, col4) + tag_1(col1, col2, col3, col4) VALUES - '101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')), - '102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')), - '103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00')); + '101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')), + '102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')), + '103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00')); INSERT EDGE - edge_1(col1, col2, col3, col4) + edge_1(col1, col2, col3, col4) VALUES - '101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')), - '102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')), - '103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00')); + '101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')), + '102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')), + '103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00')); """ Scenario: test tag index from pytest @@ -96,10 +96,8 @@ Feature: tag and edge index tests from pytest SHOW TAG INDEX STATUS """ Then the result should contain: - | Name | Index Status | - | 'single_tag_index' | 'FINISHED' | - | 'multi_tag_index' | 'FINISHED' | - | 'disorder_tag_index' | 'FINISHED' | + | Name | Index Status | + | 'single_tag_index,multi_tag_index,disorder_tag_index' | 'FINISHED' | When executing query: """ LOOKUP ON tag_1 WHERE tag_1.col2 == 18 YIELD tag_1.col1 @@ -172,8 +170,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE TAG INDEX `multi_tag_index` ON `tag_1` ( - `col2`, - `col3` + `col2`, + `col3` ) """ Then the execution should be successful @@ -192,8 +190,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE TAG INDEX `disorder_tag_index` ON `tag_1` ( - `col3`, - `col2` + `col3`, + `col2` ) """ Then the execution should be successful @@ -333,10 +331,8 @@ Feature: tag and edge index tests from pytest SHOW EDGE INDEX STATUS """ Then the result should contain: - | Name | Index Status | - | 'single_edge_index' | 'FINISHED' | - | 'multi_edge_index' | 'FINISHED' | - | 'disorder_edge_index' | 'FINISHED' | + | Name | Index Status | + | 'single_edge_index,multi_edge_index,disorder_edge_index' | 'FINISHED' | # Lookup When executing query: """ @@ -418,8 +414,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE EDGE INDEX `multi_edge_index` ON `edge_1` ( - `col2`, - `col3` + `col2`, + `col3` ) """ Then the execution should be successful @@ -439,8 +435,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE EDGE INDEX `disorder_edge_index` ON `edge_1` ( - `col3`, - `col2` + `col3`, + `col2` ) """ Then the execution should be successful From e4b2707739c9e1819acb9aaf3b1ba65a7d71d291 Mon Sep 17 00:00:00 2001 From: heroicNeZha <25311962+heroicNeZha@users.noreply.github.com> Date: Fri, 19 Nov 2021 16:04:54 +0800 Subject: [PATCH 3/4] test - compate in release --- tests/tck/features/admin/Hosts.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tck/features/admin/Hosts.feature b/tests/tck/features/admin/Hosts.feature index 5ee39e2c93b..c705a835894 100644 --- a/tests/tck/features/admin/Hosts.feature +++ b/tests/tck/features/admin/Hosts.feature @@ -18,21 +18,21 @@ Feature: Admin hosts """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | '' | + | /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | /.*/ | When executing query: """ SHOW HOSTS META; """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | '' | + | /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | /.*/ | When executing query: """ SHOW HOSTS STORAGE; """ Then the result should contain: | Host | Port | Status | Role | Git Info Sha | Version | - | /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | '' | + | /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | /.*/ | Scenario: Create space When executing query: From 6b50ddfc30225fa117148d623353d12d59858a3d Mon Sep 17 00:00:00 2001 From: heroicNeZha <25311962+heroicNeZha@users.noreply.github.com> Date: Fri, 26 Nov 2021 12:25:41 +0800 Subject: [PATCH 4/4] format --- tests/tck/features/admin/Hosts.feature | 1 - tests/tck/features/index/TagEdgeIndex.feature | 32 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/tests/tck/features/admin/Hosts.feature b/tests/tck/features/admin/Hosts.feature index c705a835894..2a70092f1e9 100644 --- a/tests/tck/features/admin/Hosts.feature +++ b/tests/tck/features/admin/Hosts.feature @@ -1,7 +1,6 @@ # Copyright (c) 2021 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. -@li Feature: Admin hosts Scenario: Show hosts diff --git a/tests/tck/features/index/TagEdgeIndex.feature b/tests/tck/features/index/TagEdgeIndex.feature index 7935e9bf151..def5d5f7cd4 100644 --- a/tests/tck/features/index/TagEdgeIndex.feature +++ b/tests/tck/features/index/TagEdgeIndex.feature @@ -13,17 +13,17 @@ Feature: tag and edge index tests from pytest CREATE TAG tag_1(col1 string, col2 int, col3 double, col4 timestamp); CREATE EDGE edge_1(col1 string, col2 int, col3 double, col4 timestamp); INSERT VERTEX - tag_1(col1, col2, col3, col4) + tag_1(col1, col2, col3, col4) VALUES - '101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')), - '102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')), - '103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00')); + '101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')), + '102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')), + '103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00')); INSERT EDGE - edge_1(col1, col2, col3, col4) + edge_1(col1, col2, col3, col4) VALUES - '101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')), - '102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')), - '103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00')); + '101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')), + '102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')), + '103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00')); """ Scenario: test tag index from pytest @@ -170,8 +170,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE TAG INDEX `multi_tag_index` ON `tag_1` ( - `col2`, - `col3` + `col2`, + `col3` ) """ Then the execution should be successful @@ -190,8 +190,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE TAG INDEX `disorder_tag_index` ON `tag_1` ( - `col3`, - `col2` + `col3`, + `col2` ) """ Then the execution should be successful @@ -414,8 +414,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE EDGE INDEX `multi_edge_index` ON `edge_1` ( - `col2`, - `col3` + `col2`, + `col3` ) """ Then the execution should be successful @@ -435,8 +435,8 @@ Feature: tag and edge index tests from pytest When executing query: """ CREATE EDGE INDEX `disorder_edge_index` ON `edge_1` ( - `col3`, - `col2` + `col3`, + `col2` ) """ Then the execution should be successful