Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content_rating test not happy #4527

Closed
benjaoming opened this issue Sep 28, 2015 · 8 comments
Closed

content_rating test not happy #4527

benjaoming opened this issue Sep 28, 2015 · 8 comments
Assignees
Milestone

Comments

@benjaoming
Copy link
Contributor

Any chance getting this fixed for 0.15? It's a test so not a dangerous fix, just that it'd be nice to get rid of these inconclusive / random test failures.

Circle CI output...

  Scenario: User alters text feedback       # kalite/distributed/features/content_rating.feature:18
    Given I have filled out a feedback form # kalite/distributed/features/steps/content_rating.py:113
    Given I have filled out a feedback form # kalite/distributed/features/steps/content_rating.py:113 8.351s
      Assertion Failed: FAILED SUB-STEP: When I fill out the form
      Substep info: Traceback (most recent call last):
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/behave/model.py", line 1173, in run
          match.run(runner.context)
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/behave/model.py", line 1589, in run
          self.func(context, *args, **kwargs)
        File "/home/ubuntu/ka-lite/kalite/distributed/features/steps/content_rating.py", line 108, in impl
          enter_star_ratings(context)
        File "/home/ubuntu/ka-lite/kalite/distributed/features/steps/content_rating.py", line 159, in enter_star_ratings
          rate_id(context, id_)
        File "/home/ubuntu/ka-lite/kalite/distributed/features/steps/content_rating.py", line 179, in rate_id
          rating_el.click()
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py", line 65, in click
          self._execute(Command.CLICK_ELEMENT)
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py", line 402, in _execute
          return self._parent.execute(command, params)
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 175, in execute
          self.error_handler.check_response(response)
        File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 166, in check_response
          raise exception_class(message, screen, stacktrace)
      StaleElementReferenceException: Message: Element is no longer attached to the DOM
      For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
      Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
      System info: host: 'chef', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.13.0-32-generic', java.version: '1.8.0_60'
      Driver info: driver.version: unknown
      Stacktrace:
          at <anonymous class>.fxdriver.cache.getElementAt (resource://fxdriver/modules/web-element-cache.js:9351)
          at <anonymous class>.Utils.getElementAt (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:8942)
          at <anonymous class>.fxdriver.preconditions.visible (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:9980)
          at <anonymous class>.DelayedCommand.prototype.checkPreconditions_ (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:12626)
          at <anonymous class>.DelayedCommand.prototype.executeInternal_/h (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:12643)
          at <anonymous class>.DelayedCommand.prototype.executeInternal_ (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:12648)
          at <anonymous class>.DelayedCommand.prototype.execute/< (file:///tmp/anonymous6389913725208483987webdriver-profile/extensions/[email protected]/components/command-processor.js:12590)
@benjaoming benjaoming added this to the 0.15.0 milestone Sep 28, 2015
@MCGallaspy
Copy link
Contributor

It had been working -- are you sure this isn't indicative of an actual error?

@MCGallaspy
Copy link
Contributor

BTW, the links to the test run on sauce labs are helpful in determining whether there's a legitimate error or if our app is having a moment. Be sure to check those out & include them in cases like this where you think there is a smelly test. I can't find a build with this specific error.

@benjaoming
Copy link
Contributor Author

It worked after rebuilding! That's why I made the issue...

@benjaoming
Copy link
Contributor Author

Here's another build with the same error:

https://circleci.com/gh/learningequality/ka-lite/1182

@MCGallaspy
Copy link
Contributor

Okay, I'll try to figure out what's going on.

@MCGallaspy MCGallaspy self-assigned this Sep 30, 2015
MCGallaspy added a commit to MCGallaspy/ka-lite that referenced this issue Oct 1, 2015
Previously the element became stale *just* after being found and prior
  to being clicked -- evidently a race condition.

If the `click` fails, this will retry -- repeated failure will raise
  a timeout error.

As for *why* the reference could be stale -- it's possible if the view
  first calls renderSequence and then calls renderAll *before* the second
  rating element is clicked. Not sure how this could happen. May in fact
  be due to something else entirely.
@benjaoming
Copy link
Contributor Author

Awesome!

@benjaoming benjaoming assigned benjaoming and unassigned MCGallaspy Oct 1, 2015
@benjaoming
Copy link
Contributor Author

Just gonna wait it out for a couple of builds to see if it works, but I would think it does :)

@rtibbles
Copy link
Member

rtibbles commented Oct 2, 2015

Should be fixed in #4548

@rtibbles rtibbles closed this as completed Oct 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants