complicated wrong logic inside selenium wrapper _execute method

Bug #1570803 reported by Sergei Chipiga
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Sergei Chipiga

Bug Description

I found that method _execute inside horizon/tests/webdriver.py has complicated and wrong logic, that in race condition leads to long tests, for example we have tests with 10 min duration.

The core problem is that `while True` is used to wait for an element, but `implicit_wait` delegates this to browser already.
We need just to catch StaleElementRereferenceException, reload the chain of element's parents and then execute a command again.

Changed in horizon:
assignee: nobody → Sergei Chipiga (schipiga)
status: New → In Progress
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Setting Importance to High since it is the root cause of intermittent test failures due to devstack job timeout.

description: updated
Changed in horizon:
milestone: none → newton-1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/306325
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=755d07cbdf66b2b01940dc2031692dce07c3e75b
Submitter: Jenkins
Branch: master

commit 755d07cbdf66b2b01940dc2031692dce07c3e75b
Author: Sergei Chipiga <email address hidden>
Date: Fri Apr 15 12:35:32 2016 +0300

    Fix longtime tests

    The core problem is in usage `while True:` to wait element,
    but implicit_wait delegates its to browser already.
    Just we need to catch StaleElement exception, reload
    chain of element parents and then to execute command again.

    Change-Id: I9c94b8adb04489c9675644d1501919af35e5bf99
    Closes-Bug: #1570803

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/307886

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/307886
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ec4fdd8a73c9c64a2d9fa93048301465ab8aea9f
Submitter: Jenkins
Branch: stable/mitaka

commit ec4fdd8a73c9c64a2d9fa93048301465ab8aea9f
Author: Sergei Chipiga <email address hidden>
Date: Fri Apr 15 12:35:32 2016 +0300

    Fix longtime tests

    The core problem is in usage `while True:` to wait element,
    but implicit_wait delegates its to browser already.
    Just we need to catch StaleElement exception, reload
    chain of element parents and then to execute command again.

    Change-Id: I9c94b8adb04489c9675644d1501919af35e5bf99
    Closes-Bug: #1570803
    (cherry picked from commit 755d07cbdf66b2b01940dc2031692dce07c3e75b)

tags: added: in-stable-mitaka
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.0.1

This issue was fixed in the openstack/horizon 9.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.