Moved a bunch of time functions into UTC. Fixes bugs which we only see for 4 hours a year.
This commit is contained in:
parent
8140c99313
commit
afcb345014
12 changed files with 22 additions and 22 deletions
|
@ -160,7 +160,7 @@ class ApiControllerTest < ActionController::TestCase
|
|||
#print @response.body
|
||||
# As we have loaded the fixtures, we can assume that there are no
|
||||
# changes recently
|
||||
now = Time.now
|
||||
now = Time.now.getutc
|
||||
hourago = now - 1.hour
|
||||
# Note that this may fail on a very slow machine, so isn't a great test
|
||||
assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do
|
||||
|
@ -181,7 +181,7 @@ class ApiControllerTest < ActionController::TestCase
|
|||
1.upto(16) do |zoom|
|
||||
get :changes, :zoom => zoom
|
||||
assert_response :success
|
||||
now = Time.now
|
||||
now = Time.now.getutc
|
||||
hourago = now - 1.hour
|
||||
# Note that this may fail on a very slow machine, so isn't a great test
|
||||
assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do
|
||||
|
|
|
@ -37,7 +37,7 @@ class ChangesetControllerTest < ActionController::TestCase
|
|||
assert_equal Rational(1,24), duration , "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
|
||||
else
|
||||
# must be number of seconds...
|
||||
assert_equal 3600.0, duration , "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
|
||||
assert_equal 3600, duration.round, "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue