diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index be2cfee04b2e2405804fad8d24b77759b6f79b13..c93fbc5eb3803a22b7a8bc99fe420bab3fb3f0c2 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -334,5 +334,6 @@ python3 ./test.py -f tag_lite/alter_tag.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py +python3 test.py -f insert/insert_before_use_db.py #======================p4-end=============== diff --git a/tests/pytest/insert/insert_before_use_db.py b/tests/pytest/insert/insert_before_use_db.py new file mode 100644 index 0000000000000000000000000000000000000000..8cc02b3d4bde3fc6465c6011ade24fd8d15818be --- /dev/null +++ b/tests/pytest/insert/insert_before_use_db.py @@ -0,0 +1,39 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import sys +from util.log import * +from util.cases import * +from util.sql import * + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def run(self): + tdSql.error('insert into tb values (now + 10m, 10)') + tdSql.prepare() + tdSql.error('insert into tb values (now + 10m, 10)') + tdSql.execute('drop database db') + tdSql.error('insert into tb values (now + 10m, 10)') + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase())