diff --git a/src/wal/src/walMain.c b/src/wal/src/walMain.c index e079653ab3696af73e187b3364d9ab00305cdb47..ae4beabb37955be4104895a330e27230598e82ef 100644 --- a/src/wal/src/walMain.c +++ b/src/wal/src/walMain.c @@ -196,6 +196,7 @@ void walFsync(void *handle) { if (pWal == NULL) return; if (pWal->level == TAOS_WAL_FSYNC && pWal->fd >=0) { + printf("WAL-SYNC executed\n"); if (fsync(pWal->fd) < 0) { wError("wal:%s, fsync failed(%s)", pWal->name, strerror(errno)); } diff --git a/tests/pytest/crash_gen.py b/tests/pytest/crash_gen.py index 9d3c66b97f12aea7e8685a923f26599d378ac8a5..a6e24142629542e6a0cbf39d22e715525e004b13 100755 --- a/tests/pytest/crash_gen.py +++ b/tests/pytest/crash_gen.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3.7 +#-----!/usr/bin/python3.7 ################################################################### # Copyright (c) 2016 by TAOS Technologies, Inc. # All rights reserved. @@ -25,6 +25,7 @@ if sys.version_info[0] < 3: import getopt import argparse import copy +import requests import threading import random @@ -1061,8 +1062,11 @@ class DbManager(): def getNextTick(self): with self._lock: # prevent duplicate tick - self._lastTick += datetime.timedelta(0, 1) # add one second to it - return self._lastTick + if Dice.throw(10) == 0 : # 1 in 10 chance + return self._lastTick + datetime.timedelta(0, -100) + else: # regular + self._lastTick += datetime.timedelta(0, 1) # add one second to it + return self._lastTick def getNextInt(self): with self._lock: @@ -1220,7 +1224,12 @@ class Task(): # sys.exit(-1) self._err = err self._aborted = True - except: + except Exception as e : + self.logInfo("Non-TAOS exception encountered") + self._err = e + self._aborted = True + traceback.print_exc() + except : self.logDebug("[=] Unexpected exception, SQL: {}".format(self._lastSql)) raise self._execStats.endTaskType(self.__class__.__name__, self.isSuccess()) @@ -1699,6 +1708,8 @@ class ClientManager: dbc = dbManager.getDbConn() if dbc.query("show databases") == 0 : # no databae return + if dbc.query("show tables") == 0 : # no tables + return dbc.execute("use db") sTbName = dbManager.getFixedSuperTableName() diff --git a/tests/pytest/crash_gen.sh b/tests/pytest/crash_gen.sh index c845b3976473bedc0fef5684c29b06f866df0840..de80361aa3ca655e81f5e36d511a6104e1c96aa6 100755 --- a/tests/pytest/crash_gen.sh +++ b/tests/pytest/crash_gen.sh @@ -38,4 +38,4 @@ export PYTHONPATH=$(pwd)/../../src/connector/python/linux/python3 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/../../build/build/lib # Now we are all let, and let's see if we can find a crash. Note we pass all params -./crash_gen.py $@ +python3 ./crash_gen.py $@