Skip to content

Commit

Permalink
RfCs: Execute all user-defined tests
Browse files Browse the repository at this point in the history
In exercises about unit testing, this change will support commenters to get more details about failures of the submission.
  • Loading branch information
MrSerth committed Oct 25, 2024
1 parent b373149 commit 3ce6ffb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/request_for_comments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def create
# As the same runner is used for the score and test run, no parallelization is possible
# A run is triggered from the frontend and does not need to be handled here.
@request_for_comment.submission.calculate_score(current_user)
@request_for_comment.submission.files.select(&:user_defined_test?).each do |file|
@request_for_comment.submission.test(file, current_user)
end
rescue Runner::Error::RunnerInUse => e
Rails.logger.debug { "Scoring a submission failed because the runner was already in use: #{e.message}" }
format.json { render json: {error: t('exercises.editor.runner_in_use'), status: :runner_in_use}, status: :conflict }
Expand Down

0 comments on commit 3ce6ffb

Please sign in to comment.