diff --git a/tests/pytest/import_merge/importDataH2.py b/tests/pytest/import_merge/importDataH2.py index 73a412fb8046ff1f6baf9c42d39221345c22fbee..b5e53d862e75935a66303f096374374a298b6a25 100644 --- a/tests/pytest/import_merge/importDataH2.py +++ b/tests/pytest/import_merge/importDataH2.py @@ -46,16 +46,16 @@ class TDTestCase: self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.maxrows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows // 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.maxrows / 2 + 1): + for rid in range(1, self.maxrows // 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -70,7 +70,7 @@ class TDTestCase: tdLog.info("================= step7") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2 + 1) + tdSql.checkRows(self.maxrows // 2 + 1) tdLog.info("================= step8") tdLog.info("import 10 data in batch before") @@ -83,7 +83,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2 + 11) + tdSql.checkRows(self.maxrows // 2 + 11) def stop(self): tdSql.close() diff --git a/tests/pytest/import_merge/importDataSub.py b/tests/pytest/import_merge/importDataSub.py index 2359ca214fd7313b93802c3c34a0406f98745647..e946a254c205b94c6a89702d7a037960c124ab99 100644 --- a/tests/pytest/import_merge/importDataSub.py +++ b/tests/pytest/import_merge/importDataSub.py @@ -46,16 +46,17 @@ class TDTestCase: self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.maxrows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows // 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.maxrows / 2 + 1): + for rid in range(1, self.maxrows // 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) + tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -73,7 +74,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.maxrows / 2) + tdSql.checkRows(self.maxrows // 2) def stop(self): tdSql.close()