[ARVADOS] updated: 99ad159b229c312ef6625e6ef042c33d0db524b9
git at public.curoverse.com
git at public.curoverse.com
Wed Oct 22 13:12:40 EDT 2014
Summary of changes:
.../test/integration/pipeline_instances_test.rb | 46 +-
apps/workbench/test/integration/projects_test.rb | 2 +-
services/api/config/application.default.yml | 3 -
services/api/script/crunch-dispatch.rb | 192 ++++----
services/api/test/fixtures/pipeline_instances.yml | 6 +-
services/crunchstat/crunchstat.go | 483 +++++++++++++--------
services/crunchstat/crunchstat_test.go | 50 +++
.../nodemanager/arvnodeman/computenode/__init__.py | 130 +++---
services/nodemanager/arvnodeman/daemon.py | 23 +-
services/nodemanager/tests/test_computenode.py | 8 +
services/nodemanager/tests/test_daemon.py | 90 +++-
11 files changed, 645 insertions(+), 388 deletions(-)
create mode 100644 services/crunchstat/crunchstat_test.go
via 99ad159b229c312ef6625e6ef042c33d0db524b9 (commit)
via e6359fe13c6b3b4558d703fecdd2f5f1713dc0e9 (commit)
via 89f38df7ce6e3af8e6119a111cdf985de6e0a0e9 (commit)
via fe5ee2e37364330b4a58c0c41e8a0b627e8cb1f2 (commit)
via 1aabac3cbaf0d701696ffabceb992826abeea8c5 (commit)
via 8d2639525417aaa02240777454405f2249d505b0 (commit)
via ca1ddb913b35eaa4aea43a88501c5b7c6ab95e2c (commit)
via 06686c47a0f99f5b5f292cde2d391024bf107514 (commit)
via 7d6bf71834622c22fd65faecbff29ba8a333c636 (commit)
via 6ad9adc1224f1c45a652258d43b7b4b92898e2d1 (commit)
via b25d2ec2950f6e2ffa9943a15c87441ebd6672b2 (commit)
via 0c6f7b227f95394fd4fffadfe7cfa022e32e5fae (commit)
via de79b73c55c5b1c469766ac8f930f335ac3fc246 (commit)
via 6d3a88841b58eb02f6f6aedd38a40ed02cc42d1f (commit)
via 3254f0a981f72decc49f2fbd43d4cffb47dfb4b4 (commit)
via 2e76e6ae877fb528d666071075afe2bf4ab21035 (commit)
via 41887dd213cfa165925e94d4f3bb120edeb1a30d (commit)
via c744c6cecd4f049ce5a2f6e922ca9f74b03fa3a3 (commit)
via 06d0338d638ce74b51ca3cfe10523e5515269fdf (commit)
via ae670519e4075b75346d6152abedf87d41e2cea7 (commit)
via 85c6c9ee95ce15f6a12b987fe611e917f043e589 (commit)
via db0472215ce261406503d7336006bcd64c9feacd (commit)
via a5ec4164873e4972aaaf943e48603daa61a044b7 (commit)
via 75b8b796ee88196ca1b99dcfed0533565c52dce7 (commit)
via 90057cfa2c19091b0d627a1df978014998e187c6 (commit)
via becd16125599abeefa3d2d1203279bf7eee69669 (commit)
via 2b08ab24b496f14d2ef97167a2e78e92b179f226 (commit)
via 5de6c0630a455eb29d83f97e6787a83c8332b1e5 (commit)
via b435064a0085044993c5c0f5b8156a61b3e32c54 (commit)
via 8aeba61dc1cf17b680d6cd3e6bcc4c01f40ff5a3 (commit)
via 5bce0483011b58a97dded8874491c7b266a850fc (commit)
via fd8ed1da05708932eb3e654e333053e1940dc29c (commit)
via ee45ddfb506f72a021f772af6477bfeab1204b3a (commit)
via c83d732301d7f192895db6c112e0bee29614e314 (commit)
via 41270a7c0897f2183b6e58674c450a34b65818e9 (commit)
via d7e558d103f5620c3c0243c0590dd80b470226ed (commit)
via 548683db5343421b9abf3ad629054c6da6237928 (commit)
via d12f645c2be4e9fd6f89689852efe668bc7d1d83 (commit)
via 4be40a40a509d1eaad11c442d137f5ecdeb45e25 (commit)
via 3e4c6eab6c4ed13071fd665aaec8a626a180e6f5 (commit)
via 7b2a3050d98153329e7a51c3b4fdfdde0859a555 (commit)
via 1e43af7e01b61945d94ef26c25a1a14b231d605b (commit)
via 3b0de2173e005deacc22d083a4aea23f9a648865 (commit)
via e69a5874b880b9b591e533e2c5f4bc4c3e2ff5d1 (commit)
from e102efba3f46986b6a2abaee2cc222db8c85198a (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 99ad159b229c312ef6625e6ef042c33d0db524b9
Author: radhika <radhika at curoverse.com>
Date: Wed Oct 22 13:12:10 2014 -0400
4227: much simplified date display test
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 6547933..a941389 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -313,48 +313,26 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
assert_not page.has_text? 'Graph'
end
- (1..10).each do |index|
+ [
+ [0, 0], # run time 0 minutes
+ [9, 17*60*60 + 51*60], # run time 17 hours and 51 minutes
+ ].each do |index, run_time|
test "pipeline start and finish time display #{index}" do
visit page_with_token("user1_with_load", "/pipeline_instances/zzzzz-d1hrv-10pipelines0#{index.to_s.rjust(3, '0')}")
- assert page.has_text? 'This pipeline started at'
+ assert page.has_text? 'This pipeline started at'
page_text = page.text
match = /This pipeline started at (.*)\. It failed after (.*) seconds at (.*)\. Check the Log/.match page_text
- start_at = match[1].split(' ')
- ran_for = match[2].split(' ')
- finished_at = match[3].split(' ')
- # start and finished time display is of the format '2:20 PM 10/20/2014'
- start_date = start_at[2].split('/')
- start_time = Time.parse(start_date[2]+'/'+start_date[0]+'/'+start_date[1]+'T'+start_at[0])
- if start_at[1].eql?('PM') and !start_at[0].start_with?('12:')
- start_time += 12*60*60
- end
+ start_at = match[1]
+ finished_at = match[3]
- finished_date = finished_at[2].split('/')
- finished_time = Time.parse(finished_date[2]+'/'+finished_date[0]+'/'+finished_date[1]+'T'+finished_at[0])
- if finished_at[1].eql?('PM') and !finished_at[0].start_with?('12:')
- finished_time += 12*60*60
- end
-
- # ran_for time display is of the format "4 minutes 52 seconds"
- run_time = ran_for[-1].to_i
- if ran_for[-2].andand.start_with?('minute')
- run_time += ran_for[-3].to_i*60 if ran_for[-3]
- elsif ran_for[-2].andand.start_with?('hour')
- run_time += ran_for[-3].to_i*60*60 if ran_for[-3]
- elsif ran_for[-2].andand.start_with?('day')
- run_time += ran_for[-3].to_i*60*60*60 if ran_for[-3]
- end
- if ran_for[-4].andand.start_with?('hour')
- run_time += ran_for[-5].to_i*60*60 if ran_for[-5]
- elsif ran_for[-4].andand.start_with?('day')
- run_time += ran_for[-5].to_i*60*60*60 if ran_for[-5]
- end
- run_time += ran_for[-7].to_i*60*60*60 if ran_for[-7]
+ # start and finished time display is of the format '2:20 PM 10/20/2014'
+ start_time = DateTime.strptime(start_at, '%I:%M %p %m/%d/%Y').to_time
+ finished_time = DateTime.strptime(finished_at, '%I:%M %p %m/%d/%Y').to_time
- assert_equal(run_time, finished_time-start_time, "Time difference did not match for start_at #{start_at}, finished_at #{finished_at}, ran_for #{ran_for}")
+ assert_equal(run_time, finished_time-start_time,
+ "Time difference did not match for start_at #{start_at}, finished_at #{finished_at}, ran_for #{match[2]}")
end
end
-
end
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 17d818d..a6e8ec4 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -563,7 +563,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
find(".dropdown-menu a", text: project_name).click
my_pipelines = []
- (1..num_pipelines).each do |i|
+ (0..num_pipelines-1).each do |i|
name = "pipeline_#{i}"
my_pipelines << name
end
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index ed8f917..53305ad 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -155,7 +155,7 @@ pipeline_with_newer_template:
# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper
# pipelines in project_with_10_pipelines
-<% for i in 1..10 do %>
+<% for i in 0..9 do %>
pipeline_<%=i%>_of_10:
name: pipeline_<%= i %>
state: Failed
@@ -176,7 +176,7 @@ pipeline_<%=i%>_of_10:
<% end %>
# pipelines in project_with_2_pipelines_and_200_jobs
-<% for i in 1..2 do %>
+<% for i in 0..1 do %>
pipeline_<%=i%>_of_2_pipelines_and_200_jobs:
name: pipeline_<%= i %>
state: New
@@ -195,7 +195,7 @@ pipeline_<%=i%>_of_2_pipelines_and_200_jobs:
<% end %>
# pipelines in project_with_25_pipelines
-<% for i in 1..25 do %>
+<% for i in 0..24 do %>
pipeline_<%=i%>_of_25:
name: pipeline_<%=i%>
state: Failed
commit e6359fe13c6b3b4558d703fecdd2f5f1713dc0e9
Merge: e102efb 89f38df
Author: radhika <radhika at curoverse.com>
Date: Wed Oct 22 11:55:02 2014 -0400
Merge branch 'master' into 4227-date-display
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list