Skip to content

Commit

Permalink
catch cur.fetchone() error
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Jan 15, 2025
1 parent 6dbcefd commit f501725
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions e2e_test/s3/file_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ def _table():
'hummockadmin',
's3://hummock001/test_file_scan/test_file_scan.parquet'
);''')
result = cur.fetchone()
assert result[0] == 0, f'file scan assertion failed: the first column is {result[0]}, expect 0.'
try:
result = cur.fetchone()
assert result[0] == 0, f'file scan assertion failed: the first column is {result[0]}, expect 0.'
except ValueError as e:
print(f"cur.fetchone() got ValueError: {e}")


print("file scan test pass")
# Execute a SELECT statement
Expand Down

0 comments on commit f501725

Please sign in to comment.