Преглед изворни кода

[jb] Explicitly set the has result flag in the kill query handle

Romain Rigaux пре 5 година
родитељ
комит
e5f82faa9f

+ 1 - 1
apps/jobbrowser/src/jobbrowser/apis/hive_query_api.py

@@ -120,7 +120,7 @@ class HiveQueryApi(Api):
     if action.get('action') == 'kill':
       for queryid in appid:
         notebook = {}
-        snippet = {'result': {'handle': {'secret': queryid, 'guid': queryid}}}
+        snippet = {'result': {'handle': {'secret': queryid, 'guid': queryid, 'has_result_set': False}}}
         connector_id = 'hive'
 
         response = _get_notebook_api(self.user, connector_id).cancel(notebook, snippet)

+ 1 - 1
apps/jobbrowser/src/jobbrowser/apis/hive_query_api_tests.py

@@ -66,7 +66,7 @@ class TestHiveQueryApiNotebook():
       response_data = json.loads(response.content)
 
       notebook = {}
-      snippet = {'result': {'handle': {'secret': appid, 'guid': appid}}}
+      snippet = {'result': {'handle': {'has_result_set': False, 'secret': appid, 'guid': appid}}}
 
       _get_notebook_api.assert_called_once_with(self.user, 'hive')
       cancel_call.assert_called_once_with(notebook, snippet)