From 5da1fffa996fbf73d8ca4b53989330d8078a45f8 Mon Sep 17 00:00:00 2001 From: Chris Zhai Date: Fri, 19 Apr 2024 16:41:53 +0800 Subject: [PATCH] update cases --- .../system-test/1-insert/composite_primary_key_create.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/system-test/1-insert/composite_primary_key_create.py b/tests/system-test/1-insert/composite_primary_key_create.py index cafedc16ac..cde960739c 100644 --- a/tests/system-test/1-insert/composite_primary_key_create.py +++ b/tests/system-test/1-insert/composite_primary_key_create.py @@ -78,12 +78,14 @@ class TDTestCase: d_type = LegalDataType.VARCHAR if t_type == TableType.SUPERTABLE: - expected_value = f'CREATE STABLE `{table_name}` (`ts` TIMESTAMP, `pk` {d_type.value} PRIMARY KEY, `c2` INT) TAGS (`engine` INT)' + expected_value = f"CREATE STABLE `{table_name}` (`ts` TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', `pk` {d_type.value} ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium' PRIMARY KEY, `c2` INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium') TAGS (`engine` INT)" elif t_type == TableType.NORNALTABLE: - expected_value = f'CREATE TABLE `{table_name}` (`ts` TIMESTAMP, `pk` {d_type.value} PRIMARY KEY, `c2` INT)' + expected_value = f"CREATE TABLE `{table_name}` (`ts` TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', `pk` {d_type.value} ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium' PRIMARY KEY, `c2` INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium')" tdSql.query(f"show create table {table_name}", show=SHOW_LOG) - tdSql.checkData(0, 1, expected_value) + result = tdSql.queryResult + + tdSql.checkEqual("PRIMARY KEY" in result[0][1], True) def test_pk_datatype_legal(self, stable_name: str, ctable_name: str, ntable_name: str, dtype: LegalDataType): # create super table and child table