-
Notifications
You must be signed in to change notification settings - Fork 604
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
Add messages and tests for DatabaseIdentityStore #1410
Add messages and tests for DatabaseIdentityStore #1410
Conversation
9ecd0c7
to
2cdae48
Compare
#build |
Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_bBqH4PC-Eee7E8dg7u8gzA Target locations of links might be accessible only to IBM employees. |
The build kristip17-1410-20180103-2053 |
#run-libby |
Code analysis and actionsDO NOT DELETE THIS COMMENT.WARNING: This pull request contains binary files, which should be managed in a Maven repository.
|
if (tc.isEventEnabled()) { | ||
Tr.event(tc, "Exception validating caller: " + caller, e); | ||
} | ||
Tr.error(tc, "JAVAEESEC_WARNING_GEN_DB", new Object[] { caller, idStoreDefinition.getCallerQuery(), e }); |
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.
Tr.warning instead of Tr.error
@@ -255,10 +255,17 @@ public CredentialValidationResult validate(Credential credential) { | |||
|
|||
private ResultSet runQuery(PreparedStatement prep, String caller) throws SQLException { | |||
long startTime = System.currentTimeMillis(); | |||
ResultSet result = prep.executeQuery(); | |||
long endTime = System.currentTimeMillis(); |
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.
Move system call into debug / trace if block.
import componenttest.topology.impl.LibertyServer; | ||
import componenttest.topology.impl.LibertyServerFactory; | ||
|
||
/* |
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.
Wrong copyright. If you copied find where this might have come from and fix that one too.
@Mode(TestMode.LITE) | ||
@Test | ||
public void testJaspiAnnotatedDBBasicNullUserPwd() throws Exception { | ||
// Log.info(logClass, getCurrentTestName(), "-----Entering " + getCurrentTestName()); |
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.
Remove commented code
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.
See review comments for findings.
28a2933
to
44ab0a6
Compare
44ab0a6
to
0a0fd76
Compare
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.
Hi, we are supposed to use the "the {variable} noun" format unless the "noun {variable}" format is already used for the component's messages. Also, we are supposed to use "error" instead of "exception," although I'm okay with "exception" if you want to keep it in the messages. I've tried to simplify the message text. If my suggested changes won't look good, then use text that you think is best. I'll approve after adding my comments.
Suggested changes:
JAVAEESEC_WARNING_GEN_DB=CWWKS1918W: The {1} query to get the {0} caller failed on the DatabaseIdentityStore with an error: {2}
JAVAEESEC_WARNING_GEN_DB.explanation=The search for the provided caller failed with an error.
JAVAEESEC_WARNING_GEN_DB.useraction=Review the provided error.
JAVAEESEC_WARNING_EXCEPTION_ON_GROUPS=CWWKS1919W: The {1} query to get the groups for the {0} caller failed on the IdentityStore. The partial list of groups is {2}. The error is {3}.
JAVAEESEC_WARNING_EXCEPTION_ON_GROUPS.explanation=The search for groups for the caller failed with an error.
JAVAEESEC_WARNING_EXCEPTION_ON_GROUPS.useraction=Review the error. A partial list of groups is returned.
JAVAEESEC_WARNING_NO_PWD=CWWKS1923W: The {1} query did not return a password for the {0} caller on the DatabaseIdentityStore.
JAVAEESEC_WARNING_NO_PWD.explanation=The query did not return a password for the provided caller query.
JAVAEESEC_WARNING_NO_PWD.useraction=If a password was expected, review the caller query and database contents.
JAVAEESEC_WARNING_MULTI_CALLER=CWWKS1924W: The {1} query returned multiple results for the {0} caller on the DatabaseIdentityStore.
JAVAEESEC_WARNING_MULTI_CALLER.explanation=Multiple results were returned for the requested caller. The caller query should only return a single result.
JAVAEESEC_WARNING_MULTI_CALLER.useraction=Review the caller query and database contents. Change the caller query so that it returns one result.
0a0fd76
to
cbcb2f2
Compare
I made Pam's changes to the message file. |
cbcb2f2
to
47f946d
Compare
fixes #1322 |
Add error and warning messages for DatabaseIdentityStore. Add additional FAT tests.