Adds a trycatch (NoSuchMissionModelException deeper within the validation worker loop, so we can catch these exceptions within each model batch iteration, generate a NoSuchMissionModelError for each validation requested for that model batch, and write them out to the database.
This avoids the issue of the worker loop only catching this exception at its outer iteration layer, which would simply print an error and then restart the main validation loop without resolving the pending validation, so it would run into the same issue over and over.
Verification
Added a new test AutomaticValidationTests::noSuchMissionModel. Running this test without the second commit of this PR will fail and output
Expected :NoSuchMissionModelFailure[message=no such mission model, modelId=0]
Actual :Pending[]
After applying the second commit, the test will pass.
Description
Adds a
try
catch (NoSuchMissionModelException
deeper within the validation worker loop, so we can catch these exceptions within each model batch iteration, generate aNoSuchMissionModelError
for each validation requested for that model batch, and write them out to the database.This avoids the issue of the worker loop only catching this exception at its outer iteration layer, which would simply print an error and then restart the main validation loop without resolving the
pending
validation, so it would run into the same issue over and over.Verification
Added a new test
AutomaticValidationTests::noSuchMissionModel
. Running this test without the second commit of this PR will fail and outputAfter applying the second commit, the test will pass.
Documentation
None
Future work
None