Skip to content

Commit

Permalink
Merge pull request #148 from randomir/master
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
randomir authored Apr 30, 2018
2 parents cf41fd1 + 4ca74e5 commit 2a475a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dwave/cloud/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def check_problem(self, linear, quadratic):
return False
return True

def retrieve_problem(self, id_):
def _retrieve_problem(self, id_):
"""Resume polling for a problem previously submitted.
Args:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_mock_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ def continue_then_complete(path, state={'count': 0}):
future = solver.sample_qubo({})
future.result()

# after third poll, back-off interval should be 4
self.assertEqual(future._poll_backoff, 4)
# after third poll, back-off interval should be 4 x initial back-off
self.assertEqual(future._poll_backoff, Client._POLL_BACKOFF_MIN * 2**2)

@mock.patch.object(Client, "_POLL_THREAD_COUNT", 1)
@mock.patch.object(Client, "_SUBMISSION_THREAD_COUNT", 1)
Expand Down Expand Up @@ -425,7 +425,7 @@ def test_cancel_with_id(self):
client.session.delete = DeleteEvent.handle

solver = Solver(client, solver_data('abc123'))
future = solver.retrieve_problem(submission_id)
future = solver._retrieve_problem(submission_id)
future.cancel()

try:
Expand Down

0 comments on commit 2a475a8

Please sign in to comment.