Refactor submission scoring and testing

* Properly cancel code execution if running is prohibited
* Correctly monitor duration with Sentry
* Align methods with running submissions
This commit is contained in:
Sebastian Serth
2023-02-16 23:59:07 +01:00
committed by Sebastian Serth
parent a1ec4579fe
commit 9c3ec3c7ff
2 changed files with 45 additions and 37 deletions

View File

@ -233,6 +233,7 @@ describe SubmissionsController do
before do
allow_any_instance_of(described_class).to receive(:hijack)
allow_any_instance_of(described_class).to receive(:kill_client_socket)
perform_request.call
end
@ -247,6 +248,7 @@ describe SubmissionsController do
before do
file.update(hidden: false)
allow_any_instance_of(described_class).to receive(:hijack)
allow_any_instance_of(described_class).to receive(:kill_client_socket)
get :test, params: {filename: "#{file.filepath}.json", id: submission.id}
end