From 44bbeea8a2090dc1d1181dbfc6b7dc244021ab5b Mon Sep 17 00:00:00 2001 From: Steven Li Date: Wed, 15 Jul 2020 07:09:15 +0000 Subject: [PATCH] Display server and config info at connect time for crash_gen tool --- tests/pytest/crash_gen.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/pytest/crash_gen.py b/tests/pytest/crash_gen.py index 547bc85669..9e38e04b63 100755 --- a/tests/pytest/crash_gen.py +++ b/tests/pytest/crash_gen.py @@ -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()