Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0744c0f9
Commit
0744c0f9
authored
6 years ago
by
Michael Youngstrom
Browse files
Options
Downloads
Patches
Plain Diff
Cache waffleswitch data to avoid query count failures
parent
d447c6c9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cms/djangoapps/contentstore/views/tests/test_course_index.py
+4
-0
4 additions, 0 deletions
cms/djangoapps/contentstore/views/tests/test_course_index.py
with
4 additions
and
0 deletions
cms/djangoapps/contentstore/views/tests/test_course_index.py
+
4
−
0
View file @
0744c0f9
...
...
@@ -14,6 +14,7 @@ from django.test.utils import override_settings
from
django.utils.translation
import
ugettext
as
_
from
opaque_keys.edx.locator
import
CourseLocator
from
search.api
import
perform_search
from
edx_django_utils.monitoring.middleware
import
_DEFAULT_NAMESPACE
as
DJANGO_UTILS_NAMESPACE
from
contentstore.courseware_index
import
CoursewareSearchIndexer
,
SearchIndexingError
from
contentstore.tests.utils
import
CourseTestCase
...
...
@@ -23,6 +24,7 @@ from contentstore.views.course import (
course_outline_initial_state
,
reindex_course_and_check_access
)
from
contentstore.config.waffle
import
WAFFLE_NAMESPACE
as
STUDIO_WAFFLE_NAMESPACE
from
contentstore.views.course
import
WAFFLE_NAMESPACE
as
COURSE_WAFFLE_NAMESPACE
from
contentstore.views.item
import
VisibilityState
,
create_xblock_info
from
course_action_state.managers
import
CourseRerunUIStateManager
...
...
@@ -368,6 +370,8 @@ class TestCourseIndexArchived(CourseTestCase):
# Make sure we've cached data which could change the query counts
# depending on test execution order
WaffleSwitchNamespace
(
name
=
COURSE_WAFFLE_NAMESPACE
).
is_enabled
(
u
'
enable_global_staff_optimization
'
)
WaffleSwitchNamespace
(
name
=
STUDIO_WAFFLE_NAMESPACE
).
is_enabled
(
u
'
enable_policy_page
'
)
WaffleSwitchNamespace
(
name
=
DJANGO_UTILS_NAMESPACE
).
is_enabled
(
u
'
enable_memory_middleware
'
)
def
check_index_page_with_query_count
(
self
,
separate_archived_courses
,
org
,
mongo_queries
,
sql_queries
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment