Merge remote-tracking branch 'origin/feature/crash_gen' into feature/vnode

This commit is contained in:
Shengliang Guan 2020-07-15 15:11:08 +08:00
commit ab15f35ef5
1 changed files with 7 additions and 1 deletions

View File

@ -763,10 +763,16 @@ class DbConnNative(DbConn):
break
return buildPath
connInfoDisplayed = False
def openByType(self): # Open connection
cfgPath = self.getBuildPath() + "/test/cfg"
hostAddr = "127.0.0.1"
if not self.connInfoDisplayed:
logger.info("Initiating TAOS native connection to {}, using config at {}".format(hostAddr, cfgPath))
self.connInfoDisplayed = True
self._conn = taos.connect(
host="127.0.0.1",
host=hostAddr,
config=cfgPath) # TODO: make configurable
self._cursor = self._conn.cursor()