Skip to content

Commit 81552ac

Browse files
committed
Correct exception handling on tests
1 parent 1f6cf6b commit 81552ac

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+
result2 = {'result': {'error': str(e)}}
272+
269273
self.num_fails += 1
270274
self.failed_tests.append(test['name'])
271275

0 commit comments

Comments
 (0)