Skip to content
Snippets Groups Projects
Unverified Commit db715edc authored by laura-ding's avatar laura-ding Committed by GitHub
Browse files

Fix get error_code (#450)


* fix error_code

* fix

Co-authored-by: default avatarYee <2520865+yixinglu@users.noreply.github.com>
parent dda68758
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@ class NebulaTestSuite(object):
@classmethod
def check_resp_succeeded(self, resp):
assert (
resp.is_succeeded
resp.is_succeeded()
or resp.error_code() == ttypes.ErrorCode.E_STATEMENT_EMPTY
), resp.error_msg()
......@@ -190,12 +190,12 @@ class NebulaTestSuite(object):
def check_resp_failed(self, resp, error_code: ttypes.ErrorCode = ttypes.ErrorCode.SUCCEEDED):
if error_code == ttypes.ErrorCode.SUCCEEDED:
assert resp.error_code() != error_code, '{} == {}, {}'.format(
ttypes.ErrorCode._VALUES_TO_NAMES[resp.error_code],
ttypes.ErrorCode._VALUES_TO_NAMES[resp.error_code()],
ttypes.ErrorCode._VALUES_TO_NAMES[error_code], resp.error_msg()
)
else:
assert resp.error_code() == error_code, '{} != {}, {}'.format(
ttypes.ErrorCode._VALUES_TO_NAMES[resp.error_code],
ttypes.ErrorCode._VALUES_TO_NAMES[resp.error_code()],
ttypes.ErrorCode._VALUES_TO_NAMES[error_code], resp.error_msg()
)
......
......@@ -291,7 +291,6 @@ class TestIndex(NebulaTestSuite):
if self.find_result(resp0, [['single_edge_index', 'FINISHED']]):
resp = self.client.execute('LOOKUP ON edge_1 WHERE edge_1.col2 == 22 YIELD edge_1.col2')
self.check_resp_succeeded(resp)
print(resp0.data.rows)
expect = [['102', 0, '103', 22]]
self.check_out_of_order_result(resp, expect)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment