-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert + improve test_job/task_metrics
- Loading branch information
Showing
3 changed files
with
59 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,27 +211,6 @@ def test_nested_collection_attributes(self): | |
] | ||
assert c4.dataset_elements == [dce1, dce2] | ||
|
||
def test_job_metrics(self): | ||
u = model.User(email="[email protected]", password="password") | ||
job = model.Job() | ||
job.user = u | ||
job.tool_id = "cat1" | ||
|
||
job.add_metric("gx", "galaxy_slots", 5) | ||
job.add_metric("system", "system_name", "localhost") | ||
|
||
self.persist(u, job) | ||
|
||
task = model.Task(job=job, working_directory="/tmp", prepare_files_cmd="split.sh") | ||
task.add_metric("gx", "galaxy_slots", 5) | ||
task.add_metric("system", "system_name", "localhost") | ||
|
||
big_value = ":".join(f"{i}" for i in range(2000)) | ||
task.add_metric("env", "BIG_PATH", big_value) | ||
self.persist(task) | ||
# Ensure big values truncated | ||
assert len(task.text_metrics[1].metric_value) <= 1023 | ||
|
||
def test_tasks(self): | ||
u = model.User(email="[email protected]", password="password") | ||
job = model.Job() | ||
|