From a07bb48a7a24694882ea39a545d0f542e39209a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Gradi=C4=8Dek?= Date: Mon, 27 Mar 2017 09:32:58 +0000 Subject: [PATCH] Bug resolved, query execution without transactions. Reviewers: buda Reviewed By: buda Subscribers: matej.gradicek Differential Revision: https://phabricator.memgraph.io/D183 --- tck_engine/steps/database.py | 10 ++++++++++ tck_engine/steps/graph.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tck_engine/steps/database.py b/tck_engine/steps/database.py index a87db9baa..17fc21395 100644 --- a/tck_engine/steps/database.py +++ b/tck_engine/steps/database.py @@ -18,6 +18,12 @@ def query(q, context, params={}): session = driver.session() try: # executing query + results = session.run(q, params) + summary = results.summary() + if not context.config.no_side_effects: + add_side_effects(context, summary.counters) + results_list = list(results) + """ with session.begin_transaction() as tx: results = tx.run(q, params) summary = results.summary() @@ -25,6 +31,10 @@ def query(q, context, params={}): add_side_effects(context, summary.counters) results_list = list(results) tx.success = True + + This code snippet should replace code which is now + executing queries when session.transactions will be supported. + """ session.close() except Exception as e: # exception diff --git a/tck_engine/steps/graph.py b/tck_engine/steps/graph.py index 8bc93f302..b48e98d94 100644 --- a/tck_engine/steps/graph.py +++ b/tck_engine/steps/graph.py @@ -44,7 +44,7 @@ def create_graph(name, context): i += 2 else: q += ch - if in_string and q_mark == ch: + if in_string and ch in q_marks: in_string = False elif ch in q_marks: in_string = True