Skip to content

Commit 78e22d5

Browse files
authored
Merge pull request #19 from SlicingDice/feature/correct-exception-handling-tests
Correct exception handling on tests
2 parents 1f6cf6b + af653fd commit 78e22d5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests_and_examples/run_query_tests.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,14 @@ def compare_result(self, query_type, test, result):
262262
if value != result[key]:
263263
time.sleep(self.sleep_time * 3)
264264
test['query'].update({"bypass-cache": True})
265-
result2 = self.execute_query(query_type, test)
266-
if value == result2[key]:
267-
print " Passed at second try"
268-
continue
265+
try:
266+
result2 = self.execute_query(query_type, test)
267+
if value == result2[key]:
268+
print " Passed at second try"
269+
continue
270+
except SlicingDiceException as e:
271+
print str(e)
272+
269273
self.num_fails += 1
270274
self.failed_tests.append(test['name'])
271275

0 commit comments

Comments
 (0)