[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH] Fixes to broken tests (1/2)



Mohammed Morsi wrote:
Alan Pevec wrote:
@@ -114,12 +114,14 @@ if File.exists? File.dirname(__FILE__) +
'/../selenium.rb'
"selenium.isElementPresent(\"//div[ id='vm_action_results']/div[3]/div/div[2]/a\")",

               10000)
         @browser.click
"//div[ id='vm_action_results']/div[3]/div/div[2]/a"
+        sleep 5 # give vm time to start
Why is sleep needed here at all if wait_for_condition below is
expecting 'running' to show up?
In general, using sleep for synchronization is wrong, although it
might seem to work.
As far as I can tell the vm tab doesn't get automatically updated via
javascript when the state of a vm changes, thus I need to wait a little
time and manually refresh the page before I check for the status. I
could do an assertion on the backend, and check the actual vm table
entry itself, but these are interface tests, thus assertions should be
on interface components.

ok, ACK for now, but needs to improve later when automatic UI refresh is fixed


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]