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
6c6f271e
Commit
6c6f271e
authored
May 25, 2017
by
J. Cliff Dyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment out broken speed test.
parent
61d247d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
cms/djangoapps/contentstore/tests/test_course_listing.py
+20
-6
No files found.
cms/djangoapps/contentstore/tests/test_course_listing.py
View file @
6c6f271e
...
...
@@ -366,10 +366,18 @@ class TestCourseListing(ModuleStoreTestCase, XssTestMixin):
courses_list
,
__
=
_accessible_courses_list_from_groups
(
self
.
request
)
self
.
assertEqual
(
len
(
courses_list
),
USER_COURSES_COUNT
)
# test that the time taken by getting courses through reversing django groups is lower then the time
# taken by traversing through all courses (if accessible courses are relatively small)
self
.
assertGreaterEqual
(
iteration_over_courses_time_1
.
elapsed
,
iteration_over_groups_time_1
.
elapsed
)
self
.
assertGreaterEqual
(
iteration_over_courses_time_2
.
elapsed
,
iteration_over_groups_time_2
.
elapsed
)
# TODO (cdyer) : iteration over courses was optimized, and is now
# sometimes faster than iteration over groups. One of the following
# should be done to resolve this:
# * Iteration over groups should be sped up.
# * Iteration over groups should be removed, as it no longer saves time.
# * Or this part of the test should be removed.
# Test that the time taken by getting courses through reversing django
# groups is lower then the time taken by traversing through all courses
# (if accessible courses are relatively small).
#self.assertGreaterEqual(iteration_over_courses_time_1.elapsed, iteration_over_groups_time_1.elapsed)
#self.assertGreaterEqual(iteration_over_courses_time_2.elapsed, iteration_over_groups_time_2.elapsed)
# Now count the db queries
with
check_mongo_calls
(
courses_list_from_group_calls
):
...
...
@@ -436,11 +444,17 @@ class TestCourseListing(ModuleStoreTestCase, XssTestMixin):
num_courses_to_create
=
3
courses
=
[
self
.
_create_course_with_access_groups
(
CourseLocator
(
'Org'
,
'CreatedCourse'
+
str
(
num
),
'Run'
),
self
.
user
)
self
.
_create_course_with_access_groups
(
CourseLocator
(
'Org'
,
'CreatedCourse'
+
str
(
num
),
'Run'
),
self
.
user
,
)
for
num
in
range
(
num_courses_to_create
)
]
courses_in_progress
=
[
self
.
_create_course_with_access_groups
(
CourseLocator
(
'Org'
,
'InProgressCourse'
+
str
(
num
),
'Run'
),
self
.
user
)
self
.
_create_course_with_access_groups
(
CourseLocator
(
'Org'
,
'InProgressCourse'
+
str
(
num
),
'Run'
),
self
.
user
,
)
for
num
in
range
(
num_courses_to_create
)
]
...
...
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