Commit f5671345667c029abf6dd56550962c8a9162fd35

Authored by Dhruv Kapadia
1 parent ee975a4e

Better error message when response times dont match up

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/tasks/test_api.rake
@@ -576,7 +576,7 @@ namespace :test_api do @@ -576,7 +576,7 @@ namespace :test_api do
576 end 576 end
577 577
578 if v.time_viewed && v.time_viewed/1000 > server_response_time 578 if v.time_viewed && v.time_viewed/1000 > server_response_time
579 - the_error_msg = "Error! Vote #{v.id} with Appearance #{v.appearance.id}, has a longer client response time than is possible. Vote creation time: #{v.created_at.to_s}, Appearance creation time: #{v.appearance.created_at.to_s}, Client side response time: #{v.time_viewed}\n" 579 + the_error_msg = "Error! Vote #{v.id} with Appearance #{v.appearance.id}, has a longer client response time than is possible. Server roundtrip time is: #{v.created_at.to_f - v.appearance.created_at.to_f} seconds, but client side response time is: #{v.time_viewed.to_f / 1000.0} seconds\n"
580 580
581 error_message += the_error_msg 581 error_message += the_error_msg
582 print the_error_msg 582 print the_error_msg