test:add testcase of data that set stt block is ahead of data block
This commit is contained in:
parent
ecdcc6dee1
commit
3e41bcd4fd
|
@ -42,18 +42,38 @@ class TDTestCase:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
binPath = self.getPath()
|
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")
|
os.system(f"{binPath} -f ./2-query/megeFileSttQuery.json")
|
||||||
tdSql.execute("flush database db;")
|
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")
|
os.system(f"{binPath} -f ./2-query/megeFileSttQueryUpdate.json")
|
||||||
tdSql.execute("flush database db;")
|
tdSql.execute("flush database db;")
|
||||||
tdLog.debug("check data")
|
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.query("select ts from db.d0 limit 5;")
|
||||||
tdSql.checkData(0, 0, '2021-10-02 00:00:00.001')
|
tdSql.checkData(0, 0, '2021-10-02 00:00:00.001')
|
||||||
tdSql.checkData(1, 0, '2021-10-02 00:01:00.000')
|
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")
|
os.system(f"{binPath} -f ./2-query/megeFileSttQueryUpdate.json")
|
||||||
tdSql.query("select ts from db.d0 limit 5;")
|
tdSql.query("select ts from db.d0 limit 5;")
|
||||||
tdSql.checkData(0, 0, '2021-10-02 00:00:00.001')
|
tdSql.checkData(0, 0, '2021-10-02 00:00:00.001')
|
||||||
|
|
Loading…
Reference in New Issue