mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 07:24:51 +00:00
fixed failing test
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@449045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6d4f9f148
commit
6e34afc293
@ -296,10 +296,6 @@
|
||||
<!-- see http://issues.apache.org/activemq/browse/AMQ-826 -->
|
||||
<!-- have not yet figured out the way to configure ApacheDS via Spring -->
|
||||
<exclude>**/LDAPAuthorizationMapTest.*</exclude>
|
||||
|
||||
<!-- TODO fix ASAP -->
|
||||
<exclude>**/SslTransportFactoryTest.*</exclude>
|
||||
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.apache.activemq.transport.tcp;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.activemq.openwire.OpenWireFormat;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -29,6 +28,7 @@ import java.util.Map;
|
||||
|
||||
public class SslTransportFactoryTest extends TestCase {
|
||||
private SslTransportFactory factory;
|
||||
private boolean verbose;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
factory = new SslTransportFactory();
|
||||
@ -52,7 +52,8 @@ public class SslTransportFactoryTest extends TestCase {
|
||||
try {
|
||||
sslTransportServer = (SslTransportServer)
|
||||
factory.doBind("brokerId", new URI("ssl://localhost:61616?" + options));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
fail("Unable to bind to address: " + e.getMessage());
|
||||
}
|
||||
|
||||
@ -64,7 +65,8 @@ public class SslTransportFactoryTest extends TestCase {
|
||||
|
||||
try {
|
||||
sslTransportServer.stop();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
fail("Unable to stop TransportServer: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
@ -105,24 +107,43 @@ public class SslTransportFactoryTest extends TestCase {
|
||||
|
||||
try {
|
||||
transport = new StubSslTransport(null, socketStub);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
fail("Unable to create StubSslTransport: " + e.getMessage());
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
System.out.println();
|
||||
System.out.println("Iteration: " + i);
|
||||
System.out.println("Map settings: " + options);
|
||||
for (int x = 0; x < optionSettings.length; x++) {
|
||||
System.out.println("optionSetting[" + x + "] = " + optionSettings[x]);
|
||||
}
|
||||
}
|
||||
|
||||
factory.compositeConfigure(transport, new OpenWireFormat(), options);
|
||||
|
||||
if (socketStub.getWantClientAuthStatus() != optionSettings[2])
|
||||
System.out.println("sheiite");
|
||||
// lets start the transport to force the introspection
|
||||
try {
|
||||
transport.start();
|
||||
}
|
||||
catch (Exception e) {
|
||||
// ignore bad connection
|
||||
}
|
||||
|
||||
assertEquals("wantClientAuth was not properly set",
|
||||
if (socketStub.getWantClientAuthStatus() != optionSettings[2]) {
|
||||
System.out.println("sheiite");
|
||||
}
|
||||
|
||||
assertEquals("wantClientAuth was not properly set for iteration: " + i,
|
||||
optionSettings[0], transport.getWantClientAuthStatus());
|
||||
assertEquals("needClientAuth was not properly set",
|
||||
assertEquals("needClientAuth was not properly set for iteration: " + i,
|
||||
optionSettings[1], transport.getNeedClientAuthStatus());
|
||||
assertEquals("socket.wantClientAuth was not properly set",
|
||||
assertEquals("socket.wantClientAuth was not properly set for iteration: " + i,
|
||||
optionSettings[2], socketStub.getWantClientAuthStatus());
|
||||
assertEquals("socket.needClientAuth was not properly set",
|
||||
assertEquals("socket.needClientAuth was not properly set for iteration: " + i,
|
||||
optionSettings[3], socketStub.getNeedClientAuthStatus());
|
||||
assertEquals("socket.useClientMode was not properly set",
|
||||
assertEquals("socket.useClientMode was not properly set for iteration: " + i,
|
||||
optionSettings[4], socketStub.getUseClientModeStatus());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user