[ARVADOS] updated: 50e9e5553d2cc194698633753c302789ae5bb2fc
git at public.curoverse.com
git at public.curoverse.com
Mon Mar 16 18:37:14 EDT 2015
Summary of changes:
sdk/cli/bin/crunch-job | 9 +++++----
...106_fix_collection_portable_data_hash_with_hinted_manifest.rb | 9 +++++++--
.../20150312151136_change_collection_expires_at_to_datetime.rb | 9 +++++++++
services/api/db/structure.sql | 6 ++++--
services/api/lib/db_current_time.rb | 2 +-
services/api/test/unit/log_test.rb | 5 +++--
6 files changed, 29 insertions(+), 11 deletions(-)
create mode 100644 services/api/db/migrate/20150312151136_change_collection_expires_at_to_datetime.rb
via 50e9e5553d2cc194698633753c302789ae5bb2fc (commit)
via 32926d6543e52daa4db8e47c2870bef4d6bdf71d (commit)
via ae8ed6d9d0e5231379564beedc08c812352b7043 (commit)
via aabde5c5f0cba198c90558a3f3bb100ea9a09b6d (commit)
via e3f359d1cf36bca2b675c495fcff0a76a89cbd38 (commit)
via 382924ca272e477a3739aec567fa2177e33da6fa (commit)
via 9877c8914fa0bb17fcb9d6f2e30e067f8b135d79 (commit)
via 4f3b7339bef1286a34745c7ecd97476f56af469c (commit)
via c3074f48c15ae7d1f4bc30939959c7243708cb37 (commit)
via 1321195ae33f9aafc5b9c328b9352b6b5277de37 (commit)
via b306eb48ab12676ffb365ede8197e4f2d7e92011 (commit)
via 9a38a7c6881e36523d2e056cab1781fcfec4af8e (commit)
from 79a18f2eb4c02212d30462b3c8eb4f989ab750d3 (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 50e9e5553d2cc194698633753c302789ae5bb2fc
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Mar 16 18:35:58 2015 -0400
5383: update db_current_time to return date with more precision. Update log_test to use db_current_time instead of Time.now to ensure if there is a slight difference in time between db time and server time, the test does not fail.
diff --git a/services/api/lib/db_current_time.rb b/services/api/lib/db_current_time.rb
index ef68b0d..120d5a4 100644
--- a/services/api/lib/db_current_time.rb
+++ b/services/api/lib/db_current_time.rb
@@ -2,6 +2,6 @@ module DbCurrentTime
CURRENT_TIME_SQL = "SELECT CURRENT_TIMESTAMP"
def db_current_time
- Time.parse(ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL)).to_time
+ ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL).to_time
end
end
diff --git a/services/api/test/unit/log_test.rb b/services/api/test/unit/log_test.rb
index ec0dc60..8642793 100644
--- a/services/api/test/unit/log_test.rb
+++ b/services/api/test/unit/log_test.rb
@@ -2,6 +2,7 @@ require 'test_helper'
class LogTest < ActiveSupport::TestCase
include CurrentApiClient
+ include DbCurrentTime
EVENT_TEST_METHODS = {
:create => [:created_at, :assert_nil, :assert_not_nil],
@@ -10,7 +11,7 @@ class LogTest < ActiveSupport::TestCase
}
def setup
- @start_time = Time.now
+ @start_time = db_current_time
@log_count = 1
end
@@ -43,7 +44,7 @@ class LogTest < ActiveSupport::TestCase
assert_equal(event_type.to_s, log.event_type, "log event type mismatch")
time_method, old_props_test, new_props_test = EVENT_TEST_METHODS[event_type]
if time_method.nil? or (timestamp = thing.send(time_method)).nil?
- assert(log.event_at.utc.to_i >= @start_time.utc.to_i, "log timestamp too old")
+ assert(log.event_at >= @start_time, "log timestamp too old")
else
assert_in_delta(timestamp, log.event_at, 1, "log timestamp mismatch")
end
commit 32926d6543e52daa4db8e47c2870bef4d6bdf71d
Merge: aabde5c ae8ed6d
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Mar 16 17:41:28 2015 -0400
Merge branch 'master' into 5383-api-db-current-time
commit aabde5c5f0cba198c90558a3f3bb100ea9a09b6d
Merge: 79a18f2 e3f359d
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Mar 16 15:30:29 2015 -0400
Merge branch 'master' into 5383-api-db-current-time
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list