Skip to content

Commit

Permalink
Added more slow/sandbox test case tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Perretta committed Aug 22, 2024
1 parent 9306440 commit 44328f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autograder/core/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
)


@tag('slow', 'sandbox')
@mock.patch('autograder.core.tasks.push_image')
@mock.patch('autograder.utils.retry.sleep', new=mock.Mock())
class BuildSandboxDockerImageTestCase(UnitTestBase):
Expand Down Expand Up @@ -215,7 +216,7 @@ def test_top_level_unexpected_error_handled(self, push_image_mock) -> None:
self.assertIn('I am error', task.internal_error_msg)


@tag('fix_on_ci')
@tag('fix_on_ci', 'slow', 'sandbox')
@mock.patch('autograder.core.tasks.push_image')
@mock.patch('autograder.utils.retry.sleep', new=mock.Mock())
class CancelBuildSandboxDockerImageTestCase(TransactionUnitTestBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def test_non_admin_cancel_task_permission_denied(self) -> None:
self.assertFalse(self.rerun_task.is_cancelled)


@tag('slow', 'sandbox')
@mock.patch('autograder.utils.retry.sleep')
class NoRetryOnObjectNotFoundTestCase(TransactionUnitTestBase):
def setUp(self):
Expand Down Expand Up @@ -594,6 +595,7 @@ def test_mutation_test_suite_not_found_no_retry(self, sleep_mock) -> None:
sleep_mock.assert_not_called()


@tag('slow', 'sandbox')
class RerunCancelledTestCase(TransactionUnitTestBase):
def setUp(self):
super().setUp()
Expand Down Expand Up @@ -630,6 +632,7 @@ def test_mutation_test_suite_not_found_no_retry(self, *args) -> None:
self.assertEqual(0, rerun_task.progress)


@tag('slow', 'sandbox')
@mock.patch('autograder.utils.retry.sleep')
class RejectSubmissionTestCase(TransactionUnitTestBase):
def test_submission_reject_in_rerun_does_not_refund_bonus_submission(self, *args) -> None:
Expand Down

0 comments on commit 44328f6

Please sign in to comment.