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

Increase wait time in XQueue stub test #2470

Merged
merged 1 commit into from
Feb 5, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_multiple_response_matches(self, post):
)

# Wait for the delayed grade response
self._wait_for_mock_called(logger.error, max_time=10)
self._wait_for_mock_called(logger.error)

# Expect that we do NOT receive a response
# and that an error message is logged
Expand Down Expand Up @@ -152,7 +152,7 @@ def _check_grade_response(self, post_mock, callback_url, expected_header, expect
"""
# Wait for the server to POST back to the callback URL
# If it takes too long, continue anyway
self._wait_for_mock_called(post_mock, max_time=10)
self._wait_for_mock_called(post_mock)

# Check the response posted back to us
# This is the default response
Expand All @@ -164,7 +164,7 @@ def _check_grade_response(self, post_mock, callback_url, expected_header, expect
# Check that the POST request was made with the correct params
post_mock.assert_called_with(callback_url, data=expected_callback_dict)

def _wait_for_mock_called(self, mock_obj, max_time=10):
def _wait_for_mock_called(self, mock_obj, max_time=120):
"""
Wait for `mock` (a `Mock` object) to be called.
If seconds elapsed exceeds `max_time`, continue without error.
Expand Down