Skip to content

Commit

Permalink
Merge pull request #6593 from youngsofun/fix
Browse files Browse the repository at this point in the history
fix(logictest): reset clickhouse sqlalchemy engine for each testfile.
  • Loading branch information
mergify[bot] authored Jul 13, 2022
2 parents ff44df7 + fdeb59c commit 5dc43ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/logictest/clickhouse_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def connect(self,
headers = e.dict("CLICKHOUSE_ADDITIONAL_HEADERS")
for key in headers:
self._additonal_headers["header__" + key] = headers[key]
self._engine = create_engine(self._uri,
connect_args=self._additonal_headers)

self._session = None

def query_with_session(self, statement):
Expand All @@ -45,7 +44,8 @@ def parseSQL(sql):
return sql # do nothing

if self._session is None:
self._session = make_session(self._engine)
engine = create_engine(self._uri, connect_args=self._additonal_headers)
self._session = make_session(engine)
log.debug(parseSQL(statement))
return self._session.execute(parseSQL(statement))

Expand Down

1 comment on commit 5dc43ec

@vercel
Copy link

@vercel vercel bot commented on 5dc43ec Jul 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

databend – ./

databend.vercel.app
databend-databend.vercel.app
databend-git-main-databend.vercel.app
databend.rs

Please sign in to comment.