Added test for pulsar resubmission

This commit is contained in:
Nuwan Goonasekera
2018-11-28 22:41:38 +05:30
parent 356d949199
commit 263d10ca1c
2 changed files with 47 additions and 0 deletions
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<!--
Slimmed down resubmission_job_conf.xml for testing default resubmission rules.
-->
<job_conf>
<plugins>
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="2"/>
<plugin id="pulsar_rest" type="runner" load="galaxy.jobs.runners.pulsar:PulsarRESTJobRunner"/>
<plugin id="pulsar_embedded" type="runner" load="galaxy.jobs.runners.pulsar:PulsarEmbeddedJobRunner"/>
</plugins>
<handlers>
<handler id="main"/>
</handlers>
<destinations default="initial_pulsar">
<destination id="initial_pulsar" runner="pulsar_rest">
<!-- Use a reserved, unused ip to force a resubmission -->
<param id="url">https://192.0.2.0:8913/</param>
<param id="private_token">some_token</param>
<resubmit condition="unknown_error" destination="pulsar_embed" />
</destination>
<destination id="pulsar_embed" runner="pulsar_embedded">
</destination>
<!-- Upload destination. -->
<destination id="local" runner="local">
</destination>
</destinations>
<tools>
<tool id="upload1" destination="local" resources="upload" />
</tools>
</job_conf>
+12
View File
@@ -13,6 +13,7 @@ JOB_RESUBMISSION_SMALL_MEMORY_RESUBMISSION_TO_LARGE_JOB_CONFIG_FILE = os.path.jo
JOB_RESUBMISSION_TOOL_DETECTED_ALWAYS_ERROR_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "resubmission_tool_detected_always_error_job_conf.xml")
JOB_RESUBMISSION_TOOL_DETECTED_RESUBMIT_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "resubmission_tool_detected_resubmit_job_conf.xml")
JOB_RESUBMISSION_JOB_RESOURCES_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "resubmission_job_resource_parameters_conf.xml")
JOB_RESUBMISSION_PULSAR_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "resubmission_pulsar_job_conf.xml")
class _BaseResubmissionIntegerationTestCase(integration_util.IntegrationTestCase):
@@ -178,3 +179,14 @@ class JobResubmissionToolDetectedErrorResubmitsIntegrationTestCase(_BaseResubmis
def test_dynamic_resubmission(self):
self._assert_job_passes(tool_id="exit_code_from_env")
# Verify that a failure to connect to pulsar can trigger a resubmit
class JobResubmissionPulsarIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
@classmethod
def handle_galaxy_config_kwds(cls, config):
config["job_config_file"] = JOB_RESUBMISSION_PULSAR_JOB_CONFIG_FILE
def test_resubmit_on_invalid_pulsar_url(self):
self._assert_job_passes()