Closed Bug 936019 Opened 11 years ago Closed 11 years ago

Intermittent test_findelement.py test_findelement.TestElements.test_timeout | AssertionError: NoSuchElementException not raised

Categories

(Testing :: Marionette Client and Harness, defect)

x86
Linux
defect
Not set
normal

Tracking

(firefox26 unaffected, firefox27 unaffected, firefox28 fixed, firefox-esr24 unaffected, b2g-v1.2 fixed)

RESOLVED FIXED
mozilla28
Tracking Status
firefox26 --- unaffected
firefox27 --- unaffected
firefox28 --- fixed
firefox-esr24 --- unaffected
b2g-v1.2 --- fixed

People

(Reporter: RyanVM, Assigned: mdas)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=30265345&tree=Mozilla-Inbound

Ubuntu VM 12.04 mozilla-inbound debug test marionette on 2013-11-07 03:26:27 PST for push e6e339fbf953
slave: tst-linux32-ec2-111

03:30:51     INFO -  TEST-START test_findelement.py
03:30:52     INFO -  test_by_name (test_findelement.TestElements) ... ok
03:30:53     INFO -  test_child_element (test_findelement.TestElements) ... ok
03:30:53     INFO -  test_child_elements (test_findelement.TestElements) ... ok
03:30:54     INFO -  test_class_name (test_findelement.TestElements) ... ok
03:30:54     INFO -  test_css_selector_scope_doesnt_start_at_rootnode (test_findelement.TestElements) ... ok
03:30:55     INFO -  test_finding_active_element_returns_element (test_findelement.TestElements) ... ok
03:30:56     INFO -  test_id (test_findelement.TestElements) ... ok
03:30:56     INFO -  test_link_text (test_findelement.TestElements) ... ok
03:30:58     INFO -  test_not_found (test_findelement.TestElements) ... ok
03:30:59     INFO -  test_partial_link_text (test_findelement.TestElements) ... ok
03:31:00     INFO -  test_selector (test_findelement.TestElements) ... ok
03:31:01     INFO -  test_tag_name (test_findelement.TestElements) ... ok
03:31:02     INFO -  test_timeout (test_findelement.TestElements) ... FAIL
03:31:04     INFO -  test_xpath (test_findelement.TestElements) ... ok
03:31:04     INFO -  ======================================================================
03:31:04     INFO -  FAIL: None
03:31:04     INFO -  ----------------------------------------------------------------------
03:31:04     INFO -  Traceback (most recent call last):
03:31:04     INFO -    File "/builds/slave/test/build/tests/marionette/marionette/marionette_test.py", line 143, in run
03:31:04     INFO -      testMethod()
03:31:04     INFO -    File "/builds/slave/test/build/tests/marionette/tests/testing/marionette/client/marionette/tests/unit/test_findelement.py", line 128, in test_timeout
03:31:04    ERROR -      self.assertRaises(NoSuchElementException, self.marionette.find_element, By.ID, "newDiv")
03:31:04    ERROR -  TEST-UNEXPECTED-FAIL | test_findelement.py test_findelement.TestElements.test_timeout | AssertionError: NoSuchElementException not raised
03:31:04     INFO -  ----------------------------------------------------------------------
03:31:04     INFO -  Ran 14 tests in 12.645s
03:31:04     INFO -  FAILED (failures=1)
This intermittent was caused by a slight slow down between navigation time and element retrieval time. The page would use setTimeout to wait 1000ms before creating the div, and the test expects that upon successful navigation, the div isn't there. The problem is that there was some delay somewhere between the navigation return and the element retrieval call, so the div would eventually be created just in time for marionette to find it.

I've changed this so the test page will create the div after a new button is clicked. So now, we navigate to the page and then trigger the eventual creation of the element. I've changed test_timeout.py to reflect the change.
Attachment #830378 - Flags: review?(jgriffin)
Comment on attachment 830378 [details] [diff] [review]
trigger div creation

Review of attachment 830378 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.  Using 1000ms timing in a TBPL test is definitely risky.  :)
Attachment #830378 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/0d8f5ac28c5a
Assignee: nobody → mdas
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Product: Testing → Remote Protocol
Moving bug to Testing::Marionette Client and Harness component per bug 1815831.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: