WING-NUS / SSID

Student Submission Integrity Diagnosis
18 stars 23 forks source link

Fix null pointer exception of assignment processing status #393

Closed sibinhho99 closed 10 months ago

sibinhho99 commented 11 months ago

Description

  1. In the current code, the forked process for Java engine in https://github.com/WING-NUS/SSID/blob/02d553a8dd482b41f40725f06c5ab9ce628012ff/lib/submissions_handler.rb#L204 might access the SubmissionSimilarityProcess object before its initialization in https://github.com/WING-NUS/SSID/blob/02d553a8dd482b41f40725f06c5ab9ce628012ff/lib/submissions_handler.rb#L237, causing null pointer exception. To fix this, I changed this initialization to before the forking.

  2. When the previous null pointer exception is resolved, the Java program is launched successfully, but it fails to insert data into the test database. As this might require deeper troubleshooting/ config changes and launching Java program for the tests is not critical since our tests are for the Ruby logic, I short-circuited the launching of the Java program in the test environment when running tests. I suppose there could be future discussions/ considerations on automated testing for the Java component and the integration.

    image
image

Related Issue

390

Motivation and Context

Bug fix

How Has This Been Tested?

Local testing

Screenshots (if appropriate):

Types of changes

Checklist:

coveralls commented 11 months ago

Coverage Status

coverage: 4.203% (-0.001%) from 4.204% when pulling 4e0257f9530db07eb9052ac2529ace4f3b2425e6 on sibinhho99:bugfix into d96beef98ef1ba1d20a9c3fd5403ff81793c487c on WING-NUS:master.