[ARVADOS] updated: 6ac8cc38894119c40ec7f4ae7475a5798a3a87ce
Git user
git at public.curoverse.com
Fri Jan 13 11:28:44 EST 2017
Summary of changes:
apps/workbench/test/unit/work_unit_test.rb | 12 +++++++-----
services/api/test/fixtures/jobs.yml | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)
via 6ac8cc38894119c40ec7f4ae7475a5798a3a87ce (commit)
from b38aee84aea043eb7bcb3acbab0a8ef64edf0838 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 6ac8cc38894119c40ec7f4ae7475a5798a3a87ce
Author: radhika <radhika at curoverse.com>
Date: Thu Jan 12 18:17:41 2017 -0500
10516: update work_unit test to compare cputime and walltime.
diff --git a/apps/workbench/test/unit/work_unit_test.rb b/apps/workbench/test/unit/work_unit_test.rb
index 3456f33..564a5d3 100644
--- a/apps/workbench/test/unit/work_unit_test.rb
+++ b/apps/workbench/test/unit/work_unit_test.rb
@@ -53,11 +53,11 @@ class WorkUnitTest < ActiveSupport::TestCase
end
[
- [Job, 'running_job_with_components', 1, 1, nil],
- [Job, 'queued', nil, 0, 1],
- [PipelineInstance, 'pipeline_in_running_state', 1, 1, nil],
- [PipelineInstance, 'has_component_with_completed_jobs', 60, 60, nil],
- ].each do |type, fixture, walltime, cputime, queuedtime|
+ [Job, 'running_job_with_components', 1, 1, nil, true],
+ [Job, 'queued', nil, 0, 1, false],
+ [PipelineInstance, 'pipeline_in_running_state', 1, 1, nil, false],
+ [PipelineInstance, 'has_component_with_completed_jobs', 60, 60, nil, true],
+ ].each do |type, fixture, walltime, cputime, queuedtime, cputime_more_than_walltime|
test "times for #{fixture}" do
use_token 'active'
obj = find_fixture(type, fixture)
@@ -80,6 +80,8 @@ class WorkUnitTest < ActiveSupport::TestCase
else
assert_equal queuedtime, wu.queuedtime
end
+
+ assert_equal cputime_more_than_walltime, (wu.cputime > wu.walltime) if wu.cputime and wu.walltime
end
end
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index 1a06d57..eb0da8b 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -510,6 +510,8 @@ completed_job_in_publicly_accessible_project:
log: zzzzz-4zz18-4en62shvi99lxd4
output: b519d9cb706a29fc7ea24dbea2f05851+93
script_parameters_digest: 02a085407e751d00b5dc88f1bd5e8247
+ started_at: <%= 10.minute.ago.to_s(:db) %>
+ finished_at: <%= 5.minute.ago.to_s(:db) %>
job_in_publicly_accessible_project_but_other_objects_elsewhere:
uuid: zzzzz-8i9sb-jyq01muyhgr4ofj
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list