Fix flaky tests - #92
Merged
Merged
Conversation
The scrolling is not entirely precise, it's sometimes off by a pixel or two. Increase the tolerance to 2 pixels.
We would often see 'Broken pipe' errors pulluting the logs when running tests. Broken pipe errors occur when browser aborts connection. It can be because the browser was navigated to a different url before the current page finished loading, but it could also be because it started downloading an image, but decided that the image didn't change after loading part of it, and aborts the connection to use the version from the cache. The broken pipe errors are benign and are actually suppressed by default in Django 1.8.
mtyaka
force-pushed
the
headandshoulders
branch
5 times, most recently
from
November 18, 2015 13:47
edcd0f5 to
98573c3
Compare
mtyaka
force-pushed
the
headandshoulders
branch
from
November 18, 2015 15:33
98573c3 to
7211bb3
Compare
See code comment for more info. Unfortunately, I wasn't able to find anything better than time.sleep().
Member
|
Can you switch the build status graphic in README.md to Circle CI, and remove |
Member
Author
|
@bradenmacdonald I switched the graphic and removed |
Member
|
@mtyaka Great :) If you remove the old |
mtyaka
force-pushed
the
headandshoulders
branch
from
November 20, 2015 08:29
67ce5fd to
dea7748
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tries to fix the situation with flaky tests by:
test_scroll_into_view) more robust by increasing the scroll check tolerance,test_author_changes). The block was reloaded immediately after the browser page was loaded in selenium. Selenium blocks while the page is loading, but it doesn't block on any ajax requests that happen after page load. The mentoring xblock requests some data at page load time via ajax (initXBlockView), which was probably causing a race condition where both the ajax request and thereload_pb_blocktest helper method were trying toget_or_createblock instance data at the same time. Unfortunately I wasn't able to prove this, but theMultipleObjectsReturnedhasn't occurred since this change.