It appears that our tests are randomly hanging when attempting to contact YouTube/Vimeo when testing the ability to insert videos into the WYSIWYG.

Here is an excerpt from the Behat test output:

  @api @javascript
  Scenario: Add a Vimeo video
    When I type "Testing body" in the "edit-body-und-0-value" WYSIWYG editor
    When I click the "Add media" button in the "edit-body-und-0-value" WYSIWYG editor
    And I switch to the frame "mediaBrowser"
    And I click "Web"
    And I fill in "File URL or media resource" with "http://vimeo.com/59482983"

No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

My guess is some sort of networking issue between Travis-CI and Vimeo? I haven't seen this when running the tests locally, so it's going to be hard to debug.

Comments

dsnopek’s picture

Issue summary: View changes

Got actual error message to copy-paste in.

dsnopek’s picture

Looking at the latest set of failures, it appears like this might only be Vimeo - I don't know if I've actually seen one that gets stuck on YouTube (which happens before Vimeo).

dsnopek’s picture

Title: Travis-CI tests randomly failing on WYSIWYG media tests with YouTube/Vimeo » Travis-CI tests randomly failing on WYSIWYG media tests with Vimeo

Yeah, saw two more failures with Vimeo - I think YouTube is unaffected by whatever this problem is. I added Vimeo waay at the end of the process of implementing this, so I may have only run it locally once or twice. When I get a chance I'll run it a bunch of times locally and see if I can't recreate this.

dsnopek’s picture

Title: Travis-CI tests randomly failing on WYSIWYG media tests with Vimeo » Travis-CI tests randomly failing on WYSIWYG media tests with YouTube/Vimeo

Hrmf. I just saw an example of it failing on YouTube...

dsnopek’s picture

If I run this test locally over and over again it will eventually occur!

What appears to be happening is that the submit button is clicked, but the function to initiate the click never returns. However, I can see in the browser window that everything successfully submitted! So, really it should just move on.

I tried a number of things:

  • Pressing the "Enter" key rather than clicking "Submit"
  • Submitting the form directly (via form.submit() in Javascript

Both things would still hang in the same way as clicking the button.

My guess is that this problem is with the iframe ceasing to exist as soon as the form is submitted. Something somewhere is waiting for feedback from that iframe, but it's gone now so that feedback never comes.

Maybe we could disconnect some events somewhere or slow things down so that the iframe isn't removed right away?

dsnopek’s picture

This could be the same issue reported in the webdriver queue:

http://code.google.com/p/selenium/issues/detail?id=5071

dsnopek’s picture

I've tried running this in Chrome (rather than Firefox) and even after 10 runs in a row, I wasn't able to get it to hang. So, I'm going to bring back some code that @cboyden did to run some tests in Chrome rather than Firefox and hopefully this will be more stable.

  • Commit c48b53a on 7.x-1.x by dsnopek:
    Issue #2229795: Travis-CI tests randomly failing on WYSIWYG media tests...
dsnopek’s picture

Status: Active » Fixed

Getting the tests to run through Chrome on Travis-CI was waaay more work than I thought it would be. In any case, I've just committed a change that will run the Media tests that need to jump between iframes in Chrome, rather than Firefox. In my local testing I wasn't ever able to get this to hang, so hopefully it'll fix the problem. If not, we'll re-open and try something else!

http://drupalcode.org/project/panopoly.git/commitdiff/c48b53a

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.