binary_binary.py 33.8 KB
Newer Older
S
Shuduo Sang 已提交
1 2 3 4 5 6 7 8 9
# -*- coding: utf-8 -*-

import sys
from util.log import *
from util.cases import *
from util.sql import *


class TDTestCase:
S
Shuduo Sang 已提交
10
    def init(self, conn, logSql):
S
Shuduo Sang 已提交
11
        tdLog.debug("start to execute %s" % __file__)
S
Shuduo Sang 已提交
12
        tdSql.init(conn.cursor(), logSql)
S
Shuduo Sang 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

    def run(self):
        tdSql.prepare()

        # TSIM: system sh/stop_dnodes.sh
        # TSIM:
        # TSIM:
        # TSIM: system sh/deploy.sh -n dnode1 -i 1
        # TSIM: system sh/cfg.sh -n dnode1 -c walLevel -v 0
        # TSIM: system sh/exec.sh -n dnode1 -s start
        # TSIM:
        # TSIM: sleep 3000
        # TSIM: sql connect
        # TSIM:
        # TSIM: print ======================== dnode1 start
        tdLog.info('======================== dnode1 start')
        # TSIM:
        # TSIM: $dbPrefix = ta_bib_db
        # TSIM: $tbPrefix = ta_bib_tb
        tbPrefix = "ta_bib_tb"
        # TSIM: $mtPrefix = ta_bib_mt
        mtPrefix = "ta_bib_mt"
        # TSIM: $tbNum = 10
        tbNum = 10
        # TSIM: $rowNum = 20
        rowNum = 20
        # TSIM: $totalNum = 200
        totalNum = 200
        # TSIM:
        # TSIM: print =============== step1
        tdLog.info('=============== step1')
        # TSIM: $i = 0
        i = 0
        # TSIM: $db = $dbPrefix . $i
        # TSIM: $mt = $mtPrefix . $i
        mt = "%s%d" % (mtPrefix, i)
        # TSIM:
        # TSIM: sql create database $db
        # TSIM: sql use $db
        # TSIM: sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol
        # binary(5), tgcol2 binary(5))
        tdLog.info(
            'create table %s (ts timestamp, tbcol int) TAGS(tgcol binary(5), tgcol2 binary(5))' %
            (mt))
        tdSql.execute(
            'create table %s (ts timestamp, tbcol int) TAGS(tgcol binary(5), tgcol2 binary(5))' %
            (mt))
        # TSIM:
        # TSIM: $i = 0
        i = 0
        # TSIM: while $i < 5
        while (i < 5):
            # TSIM: $tb = $tbPrefix . $i
            tb = "%s%d" % (tbPrefix, i)
            # TSIM: sql create table $tb using $mt tags( '0', '0' )
            tdLog.info('create table %s using %s tags( "0", "0" )' % (tb, mt))
            tdSql.execute(
                'create table %s using %s tags( "0", "0" )' %
                (tb, mt))
            # TSIM: $x = 0
            x = 0
            # TSIM: while $x < $rowNum
            while (x < rowNum):
                # TSIM: $ms = $x . m
L
liuyq-617 已提交
77
                ms = x * 60000
S
Shuduo Sang 已提交
78
                tdLog.info(
L
liuyq-617 已提交
79 80
                    "insert into %s values (%d, %d)" %
                    (tb, 1605045600000 + ms, x))
S
Shuduo Sang 已提交
81
                tdSql.execute(
L
liuyq-617 已提交
82 83
                    "insert into %s values (%d, %d)" %
                    (tb, 1605045600000 + ms, x))
S
Shuduo Sang 已提交
84 85
                # TSIM: $x = $x + 1
                x = x + 1
86
                # TSIM: endw
S
Shuduo Sang 已提交
87 88
            # TSIM: $i = $i + 1
            i = i + 1
89
            # TSIM: endw
S
Shuduo Sang 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103
        # TSIM: while $i < 10
        while (i < 10):
            # TSIM: $tb = $tbPrefix . $i
            tb = "%s%d" % (tbPrefix, i)
            # TSIM: sql create table $tb using $mt tags( '1', '1' )
            tdLog.info('create table %s using %s tags( "1", "1" )' % (tb, mt))
            tdSql.execute(
                'create table %s using %s tags( "1", "1" )' %
                (tb, mt))
            # TSIM: $x = 0
            x = 0
            # TSIM: while $x < $rowNum
            while (x < rowNum):
                # TSIM: $ms = $x . m
L
liuyq-617 已提交
104
                ms = x * 60000
S
Shuduo Sang 已提交
105
                tdLog.info(
L
liuyq-617 已提交
106 107
                    "insert into %s values (%d, %d)" %
                    (tb, 1605045600000 + ms, x))
S
Shuduo Sang 已提交
108
                tdSql.execute(
L
liuyq-617 已提交
109 110
                    "insert into %s values (%d, %d)" %
                    (tb, 1605045600000 + ms, x))
S
Shuduo Sang 已提交
111 112
                # TSIM: $x = $x + 1
                x = x + 1
113
                # TSIM: endw
S
Shuduo Sang 已提交
114 115
            # TSIM: $i = $i + 1
            i = i + 1
116
            # TSIM: endw
S
Shuduo Sang 已提交
117 118 119 120 121 122 123 124 125 126
        # TSIM:
        # TSIM: print =============== step2
        tdLog.info('=============== step2')
        # TSIM: sql select * from $mt
        tdLog.info('select * from %s' % (mt))
        tdSql.query('select * from %s' % (mt))
        # TSIM: if $rows != $totalNum then
        tdLog.info('tdSql.checkRow($totalNum)')
        tdSql.checkRows(totalNum)
        # TSIM: return -1
127
        # TSIM: endi
S
Shuduo Sang 已提交
128
        # TSIM:
L
liuyq-617 已提交
129 130 131
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001
        tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
        tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
S
Shuduo Sang 已提交
132 133 134 135
        # TSIM: if $rows != 50 then
        tdLog.info('tdSql.checkRow(50)')
        tdSql.checkRows(50)
        # TSIM: return -1
136
        # TSIM: endi
L
liuyq-617 已提交
137 138 139
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001
        tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
        tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
S
Shuduo Sang 已提交
140 141 142 143
        # TSIM: if $rows != 150 then
        tdLog.info('tdSql.checkRow(150)')
        tdSql.checkRows(150)
        # TSIM: return -1
144
        # TSIM: endi
L
liuyq-617 已提交
145 146 147
        # TSIM: sql select * from $mt where ts = 1605045600000 + 240001
        tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
        tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
S
Shuduo Sang 已提交
148 149 150 151
        # TSIM: if $rows != 0 then
        tdLog.info('tdSql.checkRow(0)')
        tdSql.checkRows(0)
        # TSIM: return -1
152
        # TSIM: endi
L
liuyq-617 已提交
153
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
S
Shuduo Sang 已提交
154
        tdLog.info(
L
liuyq-617 已提交
155
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
156 157
            (mt))
        tdSql.query(
L
liuyq-617 已提交
158
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
159 160 161 162 163
            (mt))
        # TSIM: if $rows != 10 then
        tdLog.info('tdSql.checkRow(10)')
        tdSql.checkRows(10)
        # TSIM: return -1
164
        # TSIM: endi
S
Shuduo Sang 已提交
165 166 167 168 169 170 171 172 173 174
        # TSIM:
        # TSIM: print =============== step3
        tdLog.info('=============== step3')
        # TSIM: sql select * from $mt where tgcol = '0'
        tdLog.info('select * from %s where tgcol = "0"' % (mt))
        tdSql.query('select * from %s where tgcol = "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
175
        # TSIM: endi
S
Shuduo Sang 已提交
176 177 178 179 180 181 182
        # TSIM: sql select * from $mt where tgcol <> '0'
        tdLog.info('select * from %s where tgcol <> "0"' % (mt))
        tdSql.query('select * from %s where tgcol <> "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
183
        # TSIM: endi
S
Shuduo Sang 已提交
184 185 186 187 188 189 190
        # TSIM: sql select * from $mt where tgcol = '1'
        tdLog.info('select * from %s where tgcol = "1"' % (mt))
        tdSql.query('select * from %s where tgcol = "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
191
        # TSIM: endi
S
Shuduo Sang 已提交
192 193 194 195 196 197 198
        # TSIM: sql select * from $mt where tgcol <> '1'
        tdLog.info('select * from %s where tgcol <> "1"' % (mt))
        tdSql.query('select * from %s where tgcol <> "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
199
        # TSIM: endi
S
Shuduo Sang 已提交
200 201 202 203 204 205 206
        # TSIM: sql select * from $mt where tgcol = '1'
        tdLog.info('select * from %s where tgcol = "1"' % (mt))
        tdSql.query('select * from %s where tgcol = "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
207
        # TSIM: endi
S
Shuduo Sang 已提交
208 209 210 211 212 213 214
        # TSIM: sql select * from $mt where tgcol <> '1'
        tdLog.info('select * from %s where tgcol <> "1"' % (mt))
        tdSql.query('select * from %s where tgcol <> "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
215
        # TSIM: endi
S
Shuduo Sang 已提交
216 217 218 219 220 221 222
        # TSIM: sql select * from $mt where tgcol = '0'
        tdLog.info('select * from %s where tgcol = "0"' % (mt))
        tdSql.query('select * from %s where tgcol = "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
223
        # TSIM: endi
S
Shuduo Sang 已提交
224 225 226 227 228 229 230
        # TSIM: sql select * from $mt where tgcol <> '0'
        tdLog.info('select * from %s where tgcol <> "0"' % (mt))
        tdSql.query('select * from %s where tgcol <> "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
231
        # TSIM: endi
S
Shuduo Sang 已提交
232 233 234 235 236 237 238 239 240 241
        # TSIM:
        # TSIM: print =============== step4
        tdLog.info('=============== step4')
        # TSIM: sql select * from $mt where tgcol2 = '0'
        tdLog.info('select * from %s where tgcol2 = "0"' % (mt))
        tdSql.query('select * from %s where tgcol2 = "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
242
        # TSIM: endi
S
Shuduo Sang 已提交
243 244 245 246 247 248 249
        # TSIM: sql select * from $mt where tgcol2 <> '0'
        tdLog.info('select * from %s where tgcol2 <> "0"' % (mt))
        tdSql.query('select * from %s where tgcol2 <> "0"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
250
        # TSIM: endi
S
Shuduo Sang 已提交
251 252 253 254 255 256 257
        # TSIM: sql select * from $mt where tgcol2 = '1'
        tdLog.info('select * from %s where tgcol2 = "1"' % (mt))
        tdSql.query('select * from %s where tgcol2 = "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
258
        # TSIM: endi
S
Shuduo Sang 已提交
259 260 261 262 263 264 265
        # TSIM: sql select * from $mt where tgcol2 <> '1'
        tdLog.info('select * from %s where tgcol2 <> "1"' % (mt))
        tdSql.query('select * from %s where tgcol2 <> "1"' % (mt))
        # TSIM: if $rows != 100 then
        tdLog.info('tdSql.checkRow(100)')
        tdSql.checkRows(100)
        # TSIM: return -1
266
        # TSIM: endi
S
Shuduo Sang 已提交
267 268 269
        # TSIM:
        # TSIM: print =============== step5
        tdLog.info('=============== step5')
L
liuyq-617 已提交
270
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = '1'
S
Shuduo Sang 已提交
271
        tdLog.info(
L
liuyq-617 已提交
272
            'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
S
Shuduo Sang 已提交
273 274
            (mt))
        tdSql.query(
L
liuyq-617 已提交
275
            'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
S
Shuduo Sang 已提交
276 277 278 279 280
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
281
        # TSIM: endi
L
liuyq-617 已提交
282
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '1'
S
Shuduo Sang 已提交
283
        tdLog.info(
L
liuyq-617 已提交
284
            'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
S
Shuduo Sang 已提交
285 286
            (mt))
        tdSql.query(
L
liuyq-617 已提交
287
            'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
S
Shuduo Sang 已提交
288 289 290 291 292
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
293
        # TSIM: endi
L
liuyq-617 已提交
294
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = '0'
S
Shuduo Sang 已提交
295
        tdLog.info(
L
liuyq-617 已提交
296
            'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
S
Shuduo Sang 已提交
297 298
            (mt))
        tdSql.query(
L
liuyq-617 已提交
299
            'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
S
Shuduo Sang 已提交
300 301 302 303 304
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
305
        # TSIM: endi
L
liuyq-617 已提交
306
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> '0'
S
Shuduo Sang 已提交
307
        tdLog.info(
L
liuyq-617 已提交
308
            'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
309 310
            (mt))
        tdSql.query(
L
liuyq-617 已提交
311
            'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
312 313 314 315 316
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
317
        # TSIM: endi
L
liuyq-617 已提交
318
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = '0'
S
Shuduo Sang 已提交
319
        tdLog.info(
L
liuyq-617 已提交
320
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
S
Shuduo Sang 已提交
321 322
            (mt))
        tdSql.query(
L
liuyq-617 已提交
323
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
S
Shuduo Sang 已提交
324 325 326 327 328
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
329
        # TSIM: endi
L
liuyq-617 已提交
330
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> '0'
S
Shuduo Sang 已提交
331
        tdLog.info(
L
liuyq-617 已提交
332
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
333 334
            (mt))
        tdSql.query(
L
liuyq-617 已提交
335
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
336 337 338 339 340
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
341
        # TSIM: endi
L
liuyq-617 已提交
342
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
S
Shuduo Sang 已提交
343 344
        # tgcol <> '0'
        tdLog.info(
L
liuyq-617 已提交
345
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
346 347
            (mt))
        tdSql.query(
L
liuyq-617 已提交
348
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
349 350 351 352 353
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
354
        # TSIM: endi
L
liuyq-617 已提交
355 356
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '0' and
        # ts < 1605045600000 + 300001
S
Shuduo Sang 已提交
357
        tdLog.info(
L
liuyq-617 已提交
358
            'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
359 360
            (mt))
        tdSql.query(
L
liuyq-617 已提交
361
            'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
362 363 364 365 366
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
367
        # TSIM: endi
S
Shuduo Sang 已提交
368 369 370
        # TSIM:
        # TSIM: print =============== step6
        tdLog.info('=============== step6')
L
liuyq-617 已提交
371
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1'
S
Shuduo Sang 已提交
372
        tdLog.info(
L
liuyq-617 已提交
373
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
S
Shuduo Sang 已提交
374 375
            (mt))
        tdSql.query(
L
liuyq-617 已提交
376
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
S
Shuduo Sang 已提交
377 378 379 380 381
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
382
        # TSIM: endi
L
liuyq-617 已提交
383
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1'
S
Shuduo Sang 已提交
384
        tdLog.info(
L
liuyq-617 已提交
385
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
S
Shuduo Sang 已提交
386 387
            (mt))
        tdSql.query(
L
liuyq-617 已提交
388
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
S
Shuduo Sang 已提交
389 390 391 392 393
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
394
        # TSIM: endi
L
liuyq-617 已提交
395
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0'
S
Shuduo Sang 已提交
396
        tdLog.info(
L
liuyq-617 已提交
397
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
S
Shuduo Sang 已提交
398 399
            (mt))
        tdSql.query(
L
liuyq-617 已提交
400
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
S
Shuduo Sang 已提交
401 402 403 404 405
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
406
        # TSIM: endi
L
liuyq-617 已提交
407
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0'
S
Shuduo Sang 已提交
408
        tdLog.info(
L
liuyq-617 已提交
409
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
410 411
            (mt))
        tdSql.query(
L
liuyq-617 已提交
412
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
413 414 415 416 417
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
418
        # TSIM: endi
L
liuyq-617 已提交
419
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0'
S
Shuduo Sang 已提交
420
        tdLog.info(
L
liuyq-617 已提交
421
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
S
Shuduo Sang 已提交
422 423
            (mt))
        tdSql.query(
L
liuyq-617 已提交
424
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
S
Shuduo Sang 已提交
425 426 427 428 429
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
430
        # TSIM: endi
L
liuyq-617 已提交
431
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
S
Shuduo Sang 已提交
432
        tdLog.info(
L
liuyq-617 已提交
433
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
434 435
            (mt))
        tdSql.query(
L
liuyq-617 已提交
436
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
437 438 439 440 441
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
442
        # TSIM: endi
L
liuyq-617 已提交
443
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
S
Shuduo Sang 已提交
444 445
        # tgcol2 <> '0'
        tdLog.info(
L
liuyq-617 已提交
446
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
447 448
            (mt))
        tdSql.query(
L
liuyq-617 已提交
449
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
S
Shuduo Sang 已提交
450 451 452 453 454
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
455
        # TSIM: endi
L
liuyq-617 已提交
456 457
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
        # ts < 1605045600000 + 300001
S
Shuduo Sang 已提交
458
        tdLog.info(
L
liuyq-617 已提交
459
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
460 461
            (mt))
        tdSql.query(
L
liuyq-617 已提交
462
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
S
Shuduo Sang 已提交
463 464 465 466 467
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
468
        # TSIM: endi
S
Shuduo Sang 已提交
469 470 471
        # TSIM:
        # TSIM: print =============== step7
        tdLog.info('=============== step7')
L
liuyq-617 已提交
472
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1' and
S
Shuduo Sang 已提交
473 474
        # tgcol = '1'
        tdLog.info(
L
liuyq-617 已提交
475
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = "1"' %
S
Shuduo Sang 已提交
476 477
            (mt))
        tdSql.query(
L
liuyq-617 已提交
478
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = "1"' %
S
Shuduo Sang 已提交
479 480 481 482 483
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
484
        # TSIM: endi
L
liuyq-617 已提交
485
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1' and
S
Shuduo Sang 已提交
486 487
        # tgcol <> '1'
        tdLog.info(
L
liuyq-617 已提交
488
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> "1"' %
S
Shuduo Sang 已提交
489 490
            (mt))
        tdSql.query(
L
liuyq-617 已提交
491
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> "1"' %
S
Shuduo Sang 已提交
492 493 494 495 496
            (mt))
        # TSIM: if $rows != 75 then
        tdLog.info('tdSql.checkRow(75)')
        tdSql.checkRows(75)
        # TSIM: return -1
497
        # TSIM: endi
L
liuyq-617 已提交
498
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0' and
S
Shuduo Sang 已提交
499 500
        # tgcol = '0'
        tdLog.info(
L
liuyq-617 已提交
501
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
S
Shuduo Sang 已提交
502 503
            (mt))
        tdSql.query(
L
liuyq-617 已提交
504
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
S
Shuduo Sang 已提交
505 506 507 508 509
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
510
        # TSIM: endi
L
liuyq-617 已提交
511
        # TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0' and
S
Shuduo Sang 已提交
512 513
        # tgcol <> '0'
        tdLog.info(
L
liuyq-617 已提交
514
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
515 516
            (mt))
        tdSql.query(
L
liuyq-617 已提交
517
            'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
518 519 520 521 522
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
523
        # TSIM: endi
L
liuyq-617 已提交
524
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0' and
S
Shuduo Sang 已提交
525 526
        # tgcol = '0'
        tdLog.info(
L
liuyq-617 已提交
527
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
S
Shuduo Sang 已提交
528 529
            (mt))
        tdSql.query(
L
liuyq-617 已提交
530
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
S
Shuduo Sang 已提交
531 532 533 534 535
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
536
        # TSIM: endi
L
liuyq-617 已提交
537
        # TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
S
Shuduo Sang 已提交
538 539
        # and tgcol <> '0'
        tdLog.info(
L
liuyq-617 已提交
540
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
541 542
            (mt))
        tdSql.query(
L
liuyq-617 已提交
543
            'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
544 545 546 547 548
            (mt))
        # TSIM: if $rows != 25 then
        tdLog.info('tdSql.checkRow(25)')
        tdSql.checkRows(25)
        # TSIM: return -1
549
        # TSIM: endi
L
liuyq-617 已提交
550
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
S
Shuduo Sang 已提交
551 552
        # tgcol2 <> '0' and tgcol <> '0'
        tdLog.info(
L
liuyq-617 已提交
553
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
554 555
            (mt))
        tdSql.query(
L
liuyq-617 已提交
556
            'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> "0"' %
S
Shuduo Sang 已提交
557 558 559 560 561
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
562
        # TSIM: endi
L
liuyq-617 已提交
563 564
        # TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
        # ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> '0'
S
Shuduo Sang 已提交
565
        tdLog.info(
L
liuyq-617 已提交
566
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
567 568
            (mt))
        tdSql.query(
L
liuyq-617 已提交
569
            'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
S
Shuduo Sang 已提交
570 571 572 573 574
            (mt))
        # TSIM: if $rows != 5 then
        tdLog.info('tdSql.checkRow(5)')
        tdSql.checkRows(5)
        # TSIM: return -1
575
        # TSIM: endi
S
Shuduo Sang 已提交
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
        # TSIM:
        # TSIM: print =============== step8
        tdLog.info('=============== step8')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 200 then
        tdLog.info('tdSql.checkData(0, 0, 200)')
        tdSql.checkData(0, 0, 200)
        # TSIM: return -1
593
        # TSIM: endi
S
Shuduo Sang 已提交
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
        # TSIM:
        # TSIM: print =============== step9
        tdLog.info('=============== step9')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol = '1'
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1"' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1"' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
611
        # TSIM: endi
S
Shuduo Sang 已提交
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
        # TSIM:
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol2 = '1'
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol2 = "1"' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol2 = "1"' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
627
        # TSIM: endi
S
Shuduo Sang 已提交
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
        # TSIM:
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol = '1' and
        # tgcol2 = '1'
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" and tgcol2 = "1"' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" and tgcol2 = "1"' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
644
        # TSIM: endi
S
Shuduo Sang 已提交
645 646 647 648
        # TSIM:
        # TSIM: print =============== step10
        tdLog.info('=============== step10')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
L
liuyq-617 已提交
649
        # max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
S
Shuduo Sang 已提交
650
        tdLog.info(
L
liuyq-617 已提交
651
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
S
Shuduo Sang 已提交
652 653
            (mt))
        tdSql.query(
L
liuyq-617 已提交
654
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
S
Shuduo Sang 已提交
655 656 657 658 659 660 661
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 50 then
        tdLog.info('tdSql.checkData(0, 0, 50)')
        tdSql.checkData(0, 0, 50)
        # TSIM: return -1
662
        # TSIM: endi
S
Shuduo Sang 已提交
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
        # TSIM:
        # TSIM: print =============== step11
        tdLog.info('=============== step11')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt group by tgcol
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s group by tgcol' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s group by tgcol' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
680
        # TSIM: endi
S
Shuduo Sang 已提交
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698
        # TSIM:
        # TSIM: print =============== step12
        tdLog.info('=============== step12')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol = '1'
        # group by tgcol
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" group by tgcol' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" group by tgcol' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
699
        # TSIM: endi
S
Shuduo Sang 已提交
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715
        # TSIM:
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol2 = '1'
        # group by tgcol
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol2 = "1" group by tgcol' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol2 = "1" group by tgcol' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
716
        # TSIM: endi
S
Shuduo Sang 已提交
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
        # TSIM:
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol = '1' and
        # tgcol2 = '1' group by tgcol
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" and tgcol2 = "1" group by tgcol' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where tgcol = "1" and tgcol2 = "1" group by tgcol' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 100 then
        tdLog.info('tdSql.checkData(0, 0, 100)')
        tdSql.checkData(0, 0, 100)
        # TSIM: return -1
733
        # TSIM: endi
S
Shuduo Sang 已提交
734 735 736 737 738
        # TSIM:
        # TSIM:
        # TSIM: print =============== step13
        tdLog.info('=============== step13')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
L
liuyq-617 已提交
739
        # max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
S
Shuduo Sang 已提交
740 741
        # group by tgcol
        tdLog.info(
L
liuyq-617 已提交
742
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
S
Shuduo Sang 已提交
743 744
            (mt))
        tdSql.query(
L
liuyq-617 已提交
745
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
S
Shuduo Sang 已提交
746 747 748 749 750 751 752
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data00 != 25 then
        tdLog.info('tdSql.checkData(0, 0, 25)')
        tdSql.checkData(0, 0, 25)
        # TSIM: return -1
753
        # TSIM: endi
S
Shuduo Sang 已提交
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771
        # TSIM:
        # TSIM: print =============== step14
        tdLog.info('=============== step14')
        # TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
        # max(tbcol), first(tbcol), last(tbcol) from $mt interval(1d) group by
        # tgcol
        tdLog.info(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s interval(1d) group by tgcol' %
            (mt))
        tdSql.query(
            'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s interval(1d) group by tgcol' %
            (mt))
        # TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
        tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
        # TSIM: if $data01 != 100 then
        tdLog.info('tdSql.checkData(0, 1, 100)')
        tdSql.checkData(0, 1, 100)
        # TSIM: return -1
772
        # TSIM: endi
S
Shuduo Sang 已提交
773 774 775 776 777 778 779 780 781 782 783 784 785
        # TSIM:
        # TSIM: print =============== clear
        tdLog.info('=============== clear')
        # TSIM: sql drop database $db
        tdLog.info('drop database db')
        tdSql.execute('drop database db')
        # TSIM: sql show databases
        tdLog.info('show databases')
        tdSql.query('show databases')
        # TSIM: if $rows != 0 then
        tdLog.info('tdSql.checkRow(0)')
        tdSql.checkRows(0)
        # TSIM: return -1
786
        # TSIM: endi
S
Shuduo Sang 已提交
787 788 789 790 791 792 793 794 795 796 797
        # TSIM:
        # TSIM: system sh/exec.sh -n dnode1 -s stop -x SIGINT
# convert end

    def stop(self):
        tdSql.close()
        tdLog.success("%s successfully executed" % __file__)


tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())