提交 88b08a67 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/develop' into feature/tsim

...@@ -115,7 +115,7 @@ matrix: ...@@ -115,7 +115,7 @@ matrix:
# The command that will be added as an argument to "cov-build" to compile your project for analysis, # The command that will be added as an argument to "cov-build" to compile your project for analysis,
# ** likely specific to your build ** # ** likely specific to your build **
build_command: make > /dev/null build_command: make
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'. # Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per # Take care in resource usage, and consider the build frequency allowances per
...@@ -163,7 +163,7 @@ matrix: ...@@ -163,7 +163,7 @@ matrix:
cd ${TRAVIS_BUILD_DIR}/tests cd ${TRAVIS_BUILD_DIR}/tests
./test-all.sh $TRAVIS_EVENT_TYPE ./test-all.sh $TRAVIS_EVENT_TYPE COVER
TEST_RESULT=$? TEST_RESULT=$?
......
...@@ -46,16 +46,16 @@ class TDTestCase: ...@@ -46,16 +46,16 @@ class TDTestCase:
self.maxrows) self.maxrows)
tdLog.info("================= step2") tdLog.info("================= step2")
tdLog.info("import %d sequential data" % (self.maxrows / 2)) tdLog.info("import %d sequential data" % (self.maxrows // 2))
startTime = self.startTime startTime = self.startTime
sqlcmd = ['import into tb1 values'] 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)) sqlcmd.append('(%ld, %d)' % (startTime + rid, rid))
tdSql.execute(" ".join(sqlcmd)) tdSql.execute(" ".join(sqlcmd))
tdLog.info("================= step3") tdLog.info("================= step3")
tdSql.query('select * from tb1') tdSql.query('select * from tb1')
tdSql.checkRows(self.maxrows / 2) tdSql.checkRows(self.maxrows // 2)
tdLog.info("================= step4") tdLog.info("================= step4")
tdDnodes.stop(1) tdDnodes.stop(1)
...@@ -70,7 +70,7 @@ class TDTestCase: ...@@ -70,7 +70,7 @@ class TDTestCase:
tdLog.info("================= step7") tdLog.info("================= step7")
tdSql.execute('reset query cache') tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc') 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("================= step8")
tdLog.info("import 10 data in batch before") tdLog.info("import 10 data in batch before")
...@@ -83,7 +83,7 @@ class TDTestCase: ...@@ -83,7 +83,7 @@ class TDTestCase:
tdLog.info("================= step9") tdLog.info("================= step9")
tdSql.execute('reset query cache') tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc') tdSql.query('select * from tb1 order by ts desc')
tdSql.checkRows(self.maxrows / 2 + 11) tdSql.checkRows(self.maxrows // 2 + 11)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -46,16 +46,17 @@ class TDTestCase: ...@@ -46,16 +46,17 @@ class TDTestCase:
self.maxrows) self.maxrows)
tdLog.info("================= step2") tdLog.info("================= step2")
tdLog.info("import %d sequential data" % (self.maxrows / 2)) tdLog.info("import %d sequential data" % (self.maxrows // 2))
startTime = self.startTime startTime = self.startTime
sqlcmd = ['import into tb1 values'] 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)) sqlcmd.append('(%ld, %d)' % (startTime + rid, rid))
tdSql.execute(" ".join(sqlcmd)) tdSql.execute(" ".join(sqlcmd))
tdLog.info("================= step3") tdLog.info("================= step3")
tdSql.query('select * from tb1') tdSql.query('select * from tb1')
tdSql.checkRows(self.maxrows / 2) tdSql.checkRows(self.maxrows // 2)
tdLog.info("================= step4") tdLog.info("================= step4")
tdDnodes.stop(1) tdDnodes.stop(1)
...@@ -73,7 +74,7 @@ class TDTestCase: ...@@ -73,7 +74,7 @@ class TDTestCase:
tdLog.info("================= step9") tdLog.info("================= step9")
tdSql.execute('reset query cache') tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc') tdSql.query('select * from tb1 order by ts desc')
tdSql.checkRows(self.maxrows / 2) tdSql.checkRows(self.maxrows // 2)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -33,7 +33,7 @@ class TDTestCase: ...@@ -33,7 +33,7 @@ class TDTestCase:
tdDnodes.start(1) tdDnodes.start(1)
tdSql.execute('reset query cache') tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db') tdSql.execute('drop database if exists db')
tdSql.execute('create database db cache 512 tables 10') tdSql.execute('create database db cache 512 maxtables 10')
tdSql.execute('use db') tdSql.execute('use db')
tdLog.info("================= step1") tdLog.info("================= step1")
......
...@@ -21,11 +21,12 @@ fi ...@@ -21,11 +21,12 @@ fi
echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}" echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}"
totalFailed=`grep 'failed\|fault' out.txt | wc -l` totalFailed=`grep 'failed\|fault' out.txt | wc -l`
echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" # echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
if [ "$totalFailed" -ne "0" ]; then if [ "$totalFailed" -ne "0" ]; then
# echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
exit $totalFailed
# exit $totalFailed
fi fi
echo "### run Python script ###" echo "### run Python script ###"
...@@ -46,6 +47,7 @@ fi ...@@ -46,6 +47,7 @@ fi
totalPyFailed=`grep 'failed\|fault' pytest-out.txt | wc -l` totalPyFailed=`grep 'failed\|fault' pytest-out.txt | wc -l`
if [ "$totalPyFailed" -ne "0" ]; then if [ "$totalPyFailed" -ne "0" ]; then
echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}" echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}"
exit $totalPyFailed # exit $totalPyFailed
fi fi
exit $(($totalFailed + $totalPyFailed))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册