未验证 提交 6dc19bc9 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #1876 from taosdata/hotfix/fix-integer-division-yields-float

integer division yields float in python3.
......@@ -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()
......
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册