diff --git a/dwave/cloud/solver.py b/dwave/cloud/solver.py index 955c4bd9..e0638862 100644 --- a/dwave/cloud/solver.py +++ b/dwave/cloud/solver.py @@ -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: diff --git a/tests/test_mock_submission.py b/tests/test_mock_submission.py index 9e46d140..151ad09f 100644 --- a/tests/test_mock_submission.py +++ b/tests/test_mock_submission.py @@ -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) @@ -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: