OutlinePerfTest.test_query_counts_4_8 occasionally fails with 31 queries not 32

Description

for example failed in this master build: https://jenkins.testeng.edx.org/job/edx-all-tests-auto-master/2825/

contentstore.views.tests.test_course_index.OutlinePerfTest.test_query_counts_4_8 (from nosetests)

Error Message

1 31 not greater than or equal to 32

-------------------- >> begin captured stdout << ---------------------

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Expected between 32 and 32 calls, 31 were made. Calls: {'get_more': [], 'query': [call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.active_versions', 0, -1, {'org': 'org.140', 'run': 'Run_140', 'course': 'course_140'}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8d')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.definitions', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd74')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3), call(0, u'test_xmodule.test_modulestore3e8b7.structures', 0, -1, {'_id': ObjectId('54594d62d116a945ae5abd8e')}, None, 3)]}

--------------------- >> end captured stdout << ----------------------

do you have any ideas about why this would sometimes trigger 31 queries instead of 32, and how to fix it?

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

dmitchellR

Reporter

JesseZ

Labels

Reach

None

Impact

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Stakeholders

None

Sprint

None

Priority

Unset
Configure