Skip to content

Commit 31d5258

Browse files
authored
Fix error returned by delete operation (#663)
[ML-5583](https://jira.iguazeng.com/browse/ML-5583)
1 parent 5490b8f commit 31d5258

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clients/py/tests/test_integration.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import v3io_frames as v3f
2222
from datetime import datetime
2323
import pytz
24+
2425
from conftest import has_go, test_backends, protocols, has_session
26+
from v3io_frames import DeleteError
2527

2628
tsdb_span = 5 # hours
2729
integ_params = [(p, b) for p in protocols for b in test_backends]
@@ -220,6 +222,10 @@ def test_kv_read_empty_df(framesd, session, protocol):
220222

221223
client.delete(backend, tableName)
222224

225+
# calling delete again should raise an error
226+
with pytest.raises(DeleteError):
227+
client.delete(backend, tableName)
228+
223229

224230
@pytest.mark.skipif(not has_session, reason='No session found')
225231
@pytest.mark.skipif(not has_go, reason='Go SDK not found')

clients/py/v3io_frames/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def _delete(self, backend, table, filter, start, end, if_missing, metrics):
173173
# TODO: Make it DELETE ?
174174
resp = self._session.post(url, headers=headers, json=request)
175175
if not resp.ok:
176-
raise CreateError(resp.text)
176+
raise DeleteError(resp.text)
177177

178178
@connection_error(ExecuteError)
179179
def _execute(self, backend, table, command, args, expression):

0 commit comments

Comments
 (0)