Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d73d2f58
Commit
d73d2f58
authored
Jan 12, 2017
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase the yttimeout to un-skip the video tests.
parent
37c266f0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
9 deletions
+29
-9
cms/envs/acceptance.py
+1
-0
cms/envs/bok_choy.py
+1
-0
cms/envs/common.py
+2
-0
common/lib/xmodule/xmodule/video_module/video_module.py
+1
-5
common/test/acceptance/tests/helpers.py
+19
-3
common/test/acceptance/tests/video/test_video_module.py
+1
-1
lms/envs/acceptance.py
+1
-0
lms/envs/bok_choy.py
+1
-0
lms/envs/common.py
+2
-0
No files found.
cms/envs/acceptance.py
View file @
d73d2f58
...
...
@@ -132,6 +132,7 @@ except ImportError:
YOUTUBE
[
'API'
]
=
"http://127.0.0.1:{0}/get_youtube_api/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'METADATA_URL'
]
=
"http://127.0.0.1:{0}/test_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEXT_API'
][
'url'
]
=
"127.0.0.1:{0}/test_transcripts_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEST_TIMEOUT'
]
=
1500
# Generate a random UUID so that different runs of acceptance tests don't break each other
import
uuid
...
...
cms/envs/bok_choy.py
View file @
d73d2f58
...
...
@@ -103,6 +103,7 @@ FEATURES['ENABLE_SPECIAL_EXAMS'] = True
# Point the URL used to test YouTube availability to our stub YouTube server
YOUTUBE_PORT
=
9080
YOUTUBE
[
'TEST_TIMEOUT'
]
=
5000
YOUTUBE
[
'API'
]
=
"http://127.0.0.1:{0}/get_youtube_api/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'METADATA_URL'
]
=
"http://127.0.0.1:{0}/test_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEXT_API'
][
'url'
]
=
"127.0.0.1:{0}/test_transcripts_youtube/"
.
format
(
YOUTUBE_PORT
)
...
...
cms/envs/common.py
View file @
d73d2f58
...
...
@@ -780,6 +780,8 @@ YOUTUBE = {
# YouTube JavaScript API
'API'
:
'https://www.youtube.com/iframe_api'
,
'TEST_TIMEOUT'
:
1500
,
# URL to get YouTube metadata
'METADATA_URL'
:
'https://www.googleapis.com/youtube/v3/videos'
,
...
...
common/lib/xmodule/xmodule/video_module/video_module.py
View file @
d73d2f58
...
...
@@ -315,11 +315,7 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
'end'
:
self
.
end_time
.
total_seconds
(),
'transcriptLanguage'
:
transcript_language
,
'transcriptLanguages'
:
sorted_languages
,
# TODO: Later on the value 1500 should be taken from some global
# configuration setting field.
'ytTestTimeout'
:
1500
,
'ytTestTimeout'
:
settings
.
YOUTUBE
[
'TEST_TIMEOUT'
],
'ytApiUrl'
:
settings
.
YOUTUBE
[
'API'
],
'ytMetadataUrl'
:
settings
.
YOUTUBE
[
'METADATA_URL'
],
'ytKey'
:
yt_api_key
,
...
...
common/test/acceptance/tests/helpers.py
View file @
d73d2f58
...
...
@@ -69,12 +69,28 @@ def is_youtube_available():
bool:
"""
# Skip all the youtube tests for now because they are failing intermittently
# due to changes on their side. See: TE-1927
# TODO: Design and implement a better solution that is reliable and repeatable,
# reflects how the application works in production, and limits the third-party
# network traffic (e.g. repeatedly retrieving the js from youtube from the browser).
return
False
youtube_api_urls
=
{
'main'
:
'https://www.youtube.com/'
,
'player'
:
'https://www.youtube.com/iframe_api'
,
# For transcripts, you need to check an actual video, so we will
# just specify our default video and see if that one is available.
'transcript'
:
'http://video.google.com/timedtext?lang=en&v=3_yD_cEKoCk'
,
}
for
url
in
youtube_api_urls
.
itervalues
():
try
:
response
=
requests
.
get
(
url
,
allow_redirects
=
False
)
except
requests
.
exceptions
.
ConnectionError
:
return
False
if
response
.
status_code
>=
300
:
return
False
return
True
def
is_focused_on_element
(
browser
,
selector
):
...
...
common/test/acceptance/tests/video/test_video_module.py
View file @
d73d2f58
...
...
@@ -412,7 +412,7 @@ class YouTubeVideoTest(VideoBaseTest):
Then the video has rendered in "HTML5" mode
"""
# configure youtube server
self
.
youtube_configuration
[
'time_to_response'
]
=
2
.0
self
.
youtube_configuration
[
'time_to_response'
]
=
7
.0
self
.
metadata
=
self
.
metadata_for_mode
(
'youtube_html5'
)
self
.
navigate_to_video
()
...
...
lms/envs/acceptance.py
View file @
d73d2f58
...
...
@@ -188,6 +188,7 @@ XQUEUE_INTERFACE = {
YOUTUBE
[
'API'
]
=
"http://127.0.0.1:{0}/get_youtube_api/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'METADATA_URL'
]
=
"http://127.0.0.1:{0}/test_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEXT_API'
][
'url'
]
=
"127.0.0.1:{0}/test_transcripts_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEST_TIMEOUT'
]
=
1500
if
FEATURES
.
get
(
'ENABLE_COURSEWARE_SEARCH'
)
or
\
FEATURES
.
get
(
'ENABLE_DASHBOARD_SEARCH'
)
or
\
...
...
lms/envs/bok_choy.py
View file @
d73d2f58
...
...
@@ -153,6 +153,7 @@ FEATURES['ENABLE_SPECIAL_EXAMS'] = True
# Point the URL used to test YouTube availability to our stub YouTube server
YOUTUBE_PORT
=
9080
YOUTUBE
[
'TEST_TIMEOUT'
]
=
5000
YOUTUBE
[
'API'
]
=
"http://127.0.0.1:{0}/get_youtube_api/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'METADATA_URL'
]
=
"http://127.0.0.1:{0}/test_youtube/"
.
format
(
YOUTUBE_PORT
)
YOUTUBE
[
'TEXT_API'
][
'url'
]
=
"127.0.0.1:{0}/test_transcripts_youtube/"
.
format
(
YOUTUBE_PORT
)
...
...
lms/envs/common.py
View file @
d73d2f58
...
...
@@ -1885,6 +1885,8 @@ YOUTUBE = {
# YouTube JavaScript API
'API'
:
'https://www.youtube.com/iframe_api'
,
'TEST_TIMEOUT'
:
1500
,
# URL to get YouTube metadata
'METADATA_URL'
:
'https://www.googleapis.com/youtube/v3/videos/'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment