Skip to content

Minor logging change and correction of and-clause in unit test #173

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

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void testLogonWithoutHeartBtInt() throws Exception {
try {
handler.processMessage(mockIoSession, message);
} catch (Exception e) {
fail("No exception should be thrown!");
fail("No exception should be thrown! " + e);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chrjohn - A little late and a minor point, but there isn't any need to catch an Exception here. If the exception is thrown the unit test will fail and by not catching the exception you will benefit from seeing the full stacktrace.

Cheers!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alphafoobar , you are of course right.
That happens when you don't think about what you're doing. ;)

Thanks,
Chris.

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public void assertNotAuthenticated(SessionID sessionID) throws Exception {
try {
X509Certificate[] peerCertificateChain = sslSession.getPeerCertificateChain();

if (peerCertificateChain != null & peerCertificateChain.length > 0) {
if (peerCertificateChain != null && peerCertificateChain.length > 0) {
throw new AssertionError("Certificate was authenticated");
}
} catch (SSLPeerUnverifiedException e) {
Expand Down