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.
Related Issue
390
Motivation and Context
Bug fix
How Has This Been Tested?
Local testing
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
coverage: 4.203% (-0.001%) from 4.204%
when pulling 4e0257f9530db07eb9052ac2529ace4f3b2425e6 on sibinhho99:bugfix
into d96beef98ef1ba1d20a9c3fd5403ff81793c487c on WING-NUS:master.
Description
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.
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.
Related Issue
390
Motivation and Context
Bug fix
How Has This Been Tested?
Local testing
Screenshots (if appropriate):
Types of changes
Checklist: