From 44328f66406f0f29859139cb10a326f22785bad1 Mon Sep 17 00:00:00 2001 From: James Perretta Date: Thu, 22 Aug 2024 16:46:06 -0400 Subject: [PATCH] Added more slow/sandbox test case tags. --- autograder/core/tests/test_tasks.py | 3 ++- .../tests/test_views/test_rerun_submissions_task_views.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autograder/core/tests/test_tasks.py b/autograder/core/tests/test_tasks.py index 049465d9..e015b3de 100644 --- a/autograder/core/tests/test_tasks.py +++ b/autograder/core/tests/test_tasks.py @@ -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): @@ -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): diff --git a/autograder/rest_api/tests/test_views/test_rerun_submissions_task_views.py b/autograder/rest_api/tests/test_views/test_rerun_submissions_task_views.py index 53f0d037..2eabb523 100644 --- a/autograder/rest_api/tests/test_views/test_rerun_submissions_task_views.py +++ b/autograder/rest_api/tests/test_views/test_rerun_submissions_task_views.py @@ -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): @@ -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() @@ -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: