[
https://issues.apache.org/jira/browse/DERBY-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503871
]
John H. Embretsen commented on DERBY-2274:
------------------------------------------
I'm afraid I'm not able to say whether or not you've done the right thing wrt.
the JUnit framework stuff (it looks OK to me), but I do have one comment about
the test itself (SSLTest.java).
In the public void sslTest() method, there is the following code
+ try {
+ // Should fail
+ Connection c2 = DriverManager.getConnection(plain);
+ c2.close();
+ } catch (SQLException e) {
+ if (e.getCause() != null &&
+ e.getCause() instanceof
org.apache.derby.client.am.DisconnectException) {
+ // Assumes protocol fail due to SSL on the other end
+ } else {
+ throw e;
+ }
+ }
What if the plaintext connection attempt actually succeeds, although it is
supposed to fail. Won't this just slip through without causing a test failure?
Would adding a fail(message) statement after c2.close(); be more appropriate?
> Implement testing for SSL communication
> ---------------------------------------
>
> Key: DERBY-2274
> URL: https://issues.apache.org/jira/browse/DERBY-2274
> Project: Derby
> Issue Type: Sub-task
> Components: Network Client, Network Server
> Reporter: Bernt M. Johnsen
> Assignee: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-2274.diff, DERBY-2274.stat, SSLTestServerKey.key
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.