-
Notifications
You must be signed in to change notification settings - Fork 309
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
HPCC-33526: Update datamaskingtests failure identification and reporting #19568
base: candidate-9.10.x
Are you sure you want to change the base?
HPCC-33526: Update datamaskingtests failure identification and reporting #19568
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33526 Jirabot Action Result: |
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.
Possibly a few small stylistic and print formatting changes to make if you'd like but the important parts look good.
e->Release(); | ||
CPPUNIT_FAIL(VStringBuffer("exception checking compatibility [%s]", msg.str()).str()); |
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.
In the loggingtests change you weren't calling .str()
on all your inline VStringBuffers. Why change here? Maybe a consistent approach is best? Or is it getting confused about which cast operator to apply in some situations?
Ultimately you could keep it as-is, this is a small question of style.
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.
The difference may be related to Copilot predicting something that is technically correct but may not be what I would normally do.
failed = true; | ||
} | ||
} | ||
CPPUNIT_ASSERT_MESSAGE(VStringBuffer("missing expected %s '%s'", label, v.c_str()).str(), actual.find(v) != actual.end()); |
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.
Wasn't this comparison wrong in the old test? find(v) != end() means that it was found because find(v) == end() means it wasn't found. Nothing to do here but curious....
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.
There is something to do. Two test suite classes, each with a version of this. One asserts equality (wrong) and one asserts inequality (correct).
All tests pass, regardless of condition. Proved the methods are entered by forcing each to fail as the last line. It looks like no tests are exercising this potential failure.
{ | ||
fprintf(stdout, "\n%s: hasProperties() mismatch\n", currentTest); | ||
CPPUNIT_ASSERT(false); | ||
CPPUNIT_ASSERT_MESSAGE(VStringBuffer("setProperty(\"%s\", \"foo\"", name).str(), context->setProperty(name, "foo")); |
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.
Small but missing close paren in VStringBuffer
Use framework assertion macros to identify and report failures. - Do not throw exceptions to signal failure. - Do not report failures using [f]printf. - Improve accuracy of failure reporting. - Eliminate overhead associated with manual failure logging. Signed-off-by: Tim Klemm <Tim.Klemm@lexisnexisrisk.com>
0759343
to
df95b79
Compare
@ghalliday please merge |
Use framework assertion macros to identify and report failures.
Type of change:
Checklist:
Smoketest:
Testing: