Merge pull request #3361 from taosdata/feature/crash_gen
Feature/crash gen
This commit is contained in:
commit
b545a683fb
|
@ -693,7 +693,7 @@ class DbConnRest(DbConn):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._type = self.TYPE_REST
|
self._type = self.TYPE_REST
|
||||||
self._url = "http://localhost:6020/rest/sql" # fixed for now
|
self._url = "http://localhost:6041/rest/sql" # fixed for now
|
||||||
self._result = None
|
self._result = None
|
||||||
|
|
||||||
def openByType(self): # Open connection
|
def openByType(self): # Open connection
|
||||||
|
@ -1306,6 +1306,7 @@ class DbManager():
|
||||||
"Cannot establish DB connection, please re-run script without parameter, and follow the instructions.")
|
"Cannot establish DB connection, please re-run script without parameter, and follow the instructions.")
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
else:
|
else:
|
||||||
|
print("Failed to connect to DB, errno = {}, msg: {}".format(Helper.convertErrno(err.errno), err.msg))
|
||||||
raise
|
raise
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print("[=] Unexpected exception")
|
print("[=] Unexpected exception")
|
||||||
|
@ -1910,10 +1911,19 @@ class TaskReadData(StateTransitionTask):
|
||||||
# 'twa(speed)', # TODO: this one REQUIRES a where statement, not reasonable
|
# 'twa(speed)', # TODO: this one REQUIRES a where statement, not reasonable
|
||||||
'sum(speed)',
|
'sum(speed)',
|
||||||
'stddev(speed)',
|
'stddev(speed)',
|
||||||
|
# SELECTOR functions
|
||||||
'min(speed)',
|
'min(speed)',
|
||||||
'max(speed)',
|
'max(speed)',
|
||||||
'first(speed)',
|
'first(speed)',
|
||||||
'last(speed)']) # TODO: add more from 'top'
|
'last(speed)',
|
||||||
|
# 'top(speed)', # TODO: not supported?
|
||||||
|
# 'bottom(speed)', # TODO: not supported?
|
||||||
|
# 'percentile(speed, 10)', # TODO: TD-1316
|
||||||
|
'last_row(speed)',
|
||||||
|
# Transformation Functions
|
||||||
|
# 'diff(speed)', # TODO: no supported?!
|
||||||
|
'spread(speed)'
|
||||||
|
]) # TODO: add more from 'top'
|
||||||
filterExpr = Dice.choice([ # TODO: add various kind of WHERE conditions
|
filterExpr = Dice.choice([ # TODO: add various kind of WHERE conditions
|
||||||
None
|
None
|
||||||
])
|
])
|
||||||
|
@ -2768,7 +2778,7 @@ class MainExec:
|
||||||
try:
|
try:
|
||||||
ret = self._clientMgr.run(self._svcMgr) # stop TAOS service inside
|
ret = self._clientMgr.run(self._svcMgr) # stop TAOS service inside
|
||||||
except requests.exceptions.ConnectionError as err:
|
except requests.exceptions.ConnectionError as err:
|
||||||
logger.warning("Failed to open REST connection to DB")
|
logger.warning("Failed to open REST connection to DB: {}".format(err.getMessage()))
|
||||||
# don't raise
|
# don't raise
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue