-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
162 reaudit step not working #169
Conversation
… already been reaudited.
…it a cvr that wasn't previously audited.
…udit a cvr that wasn't previously audited.
Persistence.getByID(cvr.id(), CVRAuditInfo.class); | ||
final CastVoteRecord oldAcvr = cai.acvr(); | ||
if (null == oldAcvr) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could perhaps use DD or Democracy Developers rather than individual initials?
* 6. a vote that doesn't properly correspond to the IDs it should have, and | ||
* 7. an unparseable vote (typos in json data). | ||
* 6. a vote that doesn't properly correspond to the IDs it should have, | ||
* 7. an unparseable vote (typos in json data), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "market" -> "marked"
|
||
// Seventh test: upload a vote that has typos preventing json deserialization. This should | ||
// cause an error. | ||
testErrorResponse(240515L, IRVJsonDeserializationFail, malformedACVRMsg); | ||
testErrorResponseAndNoMatchingCvr(240515L, IRVJsonDeserializationFail, malformedACVRMsg); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reaudited ballot
testSuccessResponse(240509L, "1-1-1", validIRVReauditAsJson, List.of("Alice","Chuan"), 3); | ||
// Test that the previous upload, with a vote for Bob and Chuan (validIRVAsJson) is now tagged as REAUDITED. | ||
testPreviousAreReaudited(240509L, "1-1-1", List.of("Bob","Chuan"), 1, 1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"same ballot being reaudited" ?
assertTrue(acvrs.stream().allMatch(cvr -> cvr.imprintedID().equals(expectedImprintedId))); | ||
|
||
// Find the maximum revision; check that it matches the expected maximum revision (this should match the number of | ||
// reaudits). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor point: can maxRevision or maxRevisionAcvrs be final?
This fixes two bugs in the reaudit phase, both of which caused nullpointer exceptions. It also adds some tests for proper functioning of various IRV reaudit attempts.