Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to SharedModuleStoreTestCase in the 'contentstore' app where possible. #11552

Merged
merged 3 commits into from
Feb 16, 2016

Conversation

tobz
Copy link
Contributor

@tobz tobz commented Feb 16, 2016

This is switching from ModuleStoreTestCase, to SharedModuleStoreTestCase, where possible. This is only for the 'contentstore' Django application. This helps speed up some tests where there's a lot of write-once-read-many for modulestore-based data.

@tobz
Copy link
Contributor Author

tobz commented Feb 16, 2016

/cc @ormsbee

@ormsbee
Copy link
Contributor

ormsbee commented Feb 16, 2016

@doctoryes: Do you have a moment to review some test optimizations? @tobz is converting some of our suite from ModuleStoreTestCase to SharedModuleStoreTestCase to help reduce test run times.

def setUp(self):
super(TestTaskExecution, self).setUp()
SignalHandler.course_published.disconnect(listen_for_course_publish)
SignalHandler.library_updated.disconnect(listen_for_library_update)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to disconnect signals here, since nothing is happening in the setup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, does this setUp() need to exist at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It seems like they could be in the class setup. I'll try it and see what happens.

@ormsbee
Copy link
Contributor

ormsbee commented Feb 16, 2016

Minor issue about signal disconnecting and whether that particular setUp() should continue to exist. Once that's addressed (one way or another), 👍

@doctoryes
Copy link
Contributor

That's how it's done - and all tests still pass, so seems like no test-to-test interference. 👍

tobz added a commit that referenced this pull request Feb 16, 2016
Switch to SharedModuleStoreTestCase in the 'contentstore' app where possible.
@tobz tobz merged commit d3c88d7 into master Feb 16, 2016
@tobz tobz deleted the perf/speed-up-contentstore-tests branch February 16, 2016 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants