Skip to content

Commit fe7b9cc

Browse files
author
Matthew Sackman
committed
renaming and minor refactoring
1 parent 9243c81 commit fe7b9cc

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

test/src/com/rabbitmq/client/test/ssl/SSLTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
public class SSLTests extends TestCase {
3838
public static TestSuite suite() {
3939
TestSuite suite = new TestSuite("ssl");
40-
suite.addTestSuite(Bug19356Test.class);
41-
suite.addTestSuite(Bug19356KeystoreTest.class);
40+
suite.addTestSuite(UnverifiedConnection.class);
41+
suite.addTestSuite(VerifiedConnection.class);
4242
return suite;
4343
}
4444
}

test/src/com/rabbitmq/client/test/ssl/Bug19356Test.java renamed to test/src/com/rabbitmq/client/test/ssl/UnverifiedConnection.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* Test for bug 19356 - SSL Support in rabbitmq
4242
*
4343
*/
44-
public class Bug19356Test extends BrokerTestCase {
44+
public class UnverifiedConnection extends BrokerTestCase {
4545

4646
public Exception caughtException = null;
4747
public boolean completed = false;
@@ -72,8 +72,7 @@ protected void releaseResources()
7272
}
7373
}
7474

75-
public void testBug19356()
76-
throws IOException
75+
public void testSSL() throws IOException
7776
{
7877
channel.queueDeclare("Bug19356Test", false, false, true, true, null);
7978
channel.basicPublish("", "Bug19356Test", null, "SSL".getBytes());

test/src/com/rabbitmq/client/test/ssl/Bug19356KeystoreTest.java renamed to test/src/com/rabbitmq/client/test/ssl/VerifiedConnection.java

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,12 @@
4444
import javax.net.ssl.TrustManagerFactory;
4545

4646
import com.rabbitmq.client.ConnectionFactory;
47-
import com.rabbitmq.client.GetResponse;
48-
import com.rabbitmq.client.test.functional.BrokerTestCase;
4947

5048
/**
5149
* Test for bug 19356 - SSL Support in rabbitmq
5250
*
5351
*/
54-
public class Bug19356KeystoreTest extends BrokerTestCase {
55-
56-
public Exception caughtException = null;
57-
public boolean completed = false;
58-
public boolean created = false;
52+
public class VerifiedConnection extends UnverifiedConnection {
5953

6054
public void openConnection()
6155
throws IOException
@@ -97,25 +91,4 @@ public void openConnection()
9791
connection = connectionFactory.newConnection("localhost", 5671);
9892
}
9993
}
100-
101-
protected void releaseResources()
102-
throws IOException
103-
{
104-
if (created) {
105-
channel.queueDelete("Bug19356Test");
106-
}
107-
}
108-
109-
public void testBug19356Keystore()
110-
throws IOException, NoSuchAlgorithmException, CertificateException,
111-
KeyStoreException, UnrecoverableKeyException, KeyManagementException
112-
{
113-
channel.queueDeclare("Bug19356Test", false, false, true, true, null);
114-
channel.basicPublish("", "Bug19356Test", null, "SSLKeystore".getBytes());
115-
116-
GetResponse chResponse = channel.basicGet("Bug19356Test", false);
117-
118-
byte[] body = chResponse.getBody();
119-
assertEquals("SSLKeystore", new String(body));
120-
}
12194
}

0 commit comments

Comments
 (0)