Improved timings.
This commit is contained in:
parent
4c55ca4121
commit
22f9f59a9a
3 changed files with 86 additions and 86 deletions
|
@ -81,10 +81,10 @@ class CacheTest < ActiveSupport::TestCase
|
|||
key: 'some valueöäüß2',
|
||||
},
|
||||
param: {
|
||||
expires_in: 5.seconds,
|
||||
expires_in: 3.seconds,
|
||||
}
|
||||
},
|
||||
sleep: 10,
|
||||
sleep: 5,
|
||||
verify: {
|
||||
key: '123',
|
||||
data: nil
|
||||
|
|
|
@ -75,41 +75,41 @@ class OrganizationRefObjectTouchTest < ActiveSupport::TestCase
|
|||
assert_equal(ticket.customer.id, customer1.id )
|
||||
assert_equal(ticket.organization.id, organization1.id )
|
||||
|
||||
sleep 6
|
||||
sleep 4
|
||||
|
||||
organization1.name = 'Ref Object Update Org 1/1'
|
||||
organization1.save
|
||||
|
||||
# check if ticket and customer has been touched
|
||||
ticket = Ticket.find(ticket.id)
|
||||
if ticket.updated_at > 4.seconds.ago
|
||||
if ticket.updated_at > 2.seconds.ago
|
||||
assert(true, 'ticket.updated_at has been updated')
|
||||
else
|
||||
assert(false, 'ticket.updated_at has not been updated')
|
||||
end
|
||||
|
||||
customer1 = User.find(customer1.id)
|
||||
if customer1.updated_at > 4.seconds.ago
|
||||
if customer1.updated_at > 2.seconds.ago
|
||||
assert(true, 'customer1.updated_at has been updated')
|
||||
else
|
||||
assert(false, 'customer1.updated_at has not been updated')
|
||||
end
|
||||
|
||||
sleep 6
|
||||
sleep 4
|
||||
|
||||
customer2.organization_id = organization1.id
|
||||
customer2.save
|
||||
|
||||
# check if customer1 and organization has been touched
|
||||
customer1 = User.find(customer1.id)
|
||||
if customer1.updated_at > 4.seconds.ago
|
||||
if customer1.updated_at > 2.seconds.ago
|
||||
assert(true, 'customer1.updated_at has been updated')
|
||||
else
|
||||
assert(false, 'customer1.updated_at has not been updated')
|
||||
end
|
||||
|
||||
organization1 = Organization.find(organization1.id)
|
||||
if organization1.updated_at > 4.seconds.ago
|
||||
if organization1.updated_at > 2.seconds.ago
|
||||
assert(true, 'organization1.updated_at has been updated')
|
||||
else
|
||||
assert(false, 'organization1.updated_at has not been updated')
|
||||
|
|
Loading…
Reference in a new issue