This commit is contained in:
Jesus Aguilar 2020-11-09 15:50:03 -05:00
Родитель 61d99517d4
Коммит 402fc433c2
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -87,14 +87,16 @@ class Nutter(NutterApi):
return tests
def run_test(self, testpath, cluster_id, timeout=120, pull_wait_time=DEFAULT_POLL_WAIT_TIME):
def run_test(self, testpath, cluster_id,
timeout=120, pull_wait_time=DEFAULT_POLL_WAIT_TIME):
self._add_status_event(NutterStatusEvents.TestExecutionRequest, testpath)
test_notebook = TestNotebook.from_path(testpath)
if test_notebook is None:
raise InvalidTestException
result = self.dbclient.execute_notebook(
test_notebook.path, cluster_id, timeout=timeout,pull_wait_time=pull_wait_time)
test_notebook.path, cluster_id,
timeout=timeout, pull_wait_time=pull_wait_time)
return result

Просмотреть файл

@ -11,6 +11,8 @@ from .apiclientresults import ExecuteNotebookResult, WorkspacePath
from .httpretrier import HTTPRetrier
import logging
DEFAULT_POLL_WAIT_TIME = 5
MIN_TIMEOUT = 10
def databricks_client():
@ -18,8 +20,6 @@ def databricks_client():
return db
DEFAULT_POLL_WAIT_TIME = 5
MIN_TIMEOUT = 10
class DatabricksAPIClient(object):
"""
@ -28,7 +28,7 @@ class DatabricksAPIClient(object):
def __init__(self):
config = cfg.get_auth_config()
self.min_timeout = MIN_TIMEOUT
if config is None:
raise InvalidConfigurationException