Project

General

Profile

Bug #14340

Updated by Ivan Necas over 8 years ago

While debugging #13293, I've noticed, that it can take a while to load icons, when the machine 
 is under load. This can potentially lead to layout change (see the screenshots), that leads 
 https://github.com/teampoltergeist/poltergeist#mouseeventfailed-errors. 

 Debugging notes: 

 The issue is pretty hard to debug. Here are some hints to get some additional 
 tricks that can help to detect the issue: 

 I've used this snippet so see and compare how the page 
 looks right before the click event should happen 
 <pre> 
 20.times do 
   visit edit_host_path(host) 
   assert page.has_link?('Parameters', :href => '#params') 
   click_link 'Parameters' 
   save_screenshot 
 end 
 </pre> 

 Another good thing was looking into output of the `click` method 
 (it returns the coordinates that were clicked). Tracking that 
 for a while showed this: 

 <pre> 
 2016-03-23T19:14:37 [app] [D] ====== click: {"position"=>{"x"=>851, "y"=>385}} 
 2016-03-23T19:15:20 [app] [D] ====== click: {"position"=>{"x"=>851, "y"=>385}} 
 2016-03-23T19:15:48 [app] [D] ====== click: {"position"=>{"x"=>851, "y"=>365}} 
 </pre> 

 The coordinates of the event when the failure happened were different to the usual 
 values, which was a good indication that something is wrong with the layout. 

 Also, running it inside VM with 2GB of RAM and running 2 more tests suites in parallel 
 to simulate the load in Jenkins helped to reproduce the issue.

Back