diff --git a/tests/system-test/2-query/mergeFileSttQuery.py b/tests/system-test/2-query/mergeFileSttQuery.py index 7d2695a760..4f15fe60f1 100644 --- a/tests/system-test/2-query/mergeFileSttQuery.py +++ b/tests/system-test/2-query/mergeFileSttQuery.py @@ -42,18 +42,38 @@ class TDTestCase: def run(self): binPath = self.getPath() - tdLog.debug("insert full data block and flush db") + tdLog.debug("insert full data block that has first time '2021-10-02 00:00:00.001' and flush db") os.system(f"{binPath} -f ./2-query/megeFileSttQuery.json") tdSql.execute("flush database db;") - tdLog.debug("insert disorder data and flush db") + + tdLog.debug("insert only a piece of data that is behind the time that already exists and flush db") + tdSql.execute("insert into db.d0 values ('2021-10-01 23:59:59.990',12.793,208,0.84) ;") + tdSql.execute("flush database db;") + tdLog.debug("check data") + sleep(1) + tdSql.query("select count(*) from db.d0;") + tdSql.checkData(0,0,10001) + tdSql.execute("drop database db;") + + + + + + tdLog.debug("insert full data block that has first time '2021-10-02 00:00:00.001' and flush db") + os.system(f"{binPath} -f ./2-query/megeFileSttQuery.json") + tdSql.execute("flush database db;") + + tdLog.debug("insert four pieces of disorder data, and the time range covers the data file that was previously placed on disk and flush db") os.system(f"{binPath} -f ./2-query/megeFileSttQueryUpdate.json") tdSql.execute("flush database db;") tdLog.debug("check data") + tdSql.query("select count(*) from db.d0;",queryTimes=3) + tdSql.checkData(0,0,10004) tdSql.query("select ts from db.d0 limit 5;") tdSql.checkData(0, 0, '2021-10-02 00:00:00.001') tdSql.checkData(1, 0, '2021-10-02 00:01:00.000') - tdLog.debug("update disorder data and flush db") + tdLog.debug("update the same disorder data and flush db") os.system(f"{binPath} -f ./2-query/megeFileSttQueryUpdate.json") tdSql.query("select ts from db.d0 limit 5;") tdSql.checkData(0, 0, '2021-10-02 00:00:00.001')