sanity check test of local host/port syntax with failover

This commit is contained in:
gtully 2014-03-20 14:32:31 +00:00
parent cb6941ee0b
commit af9134a4fa
1 changed files with 26 additions and 0 deletions

View File

@ -127,6 +127,32 @@ public class FailoverTransportTest {
assertNotNull("Should have received a Response", this.transport.request(info));
}
@Test
public void testLocalhostPortSyntax() throws Exception {
transport = TransportFactory.connect(
new URI("failover://(tcp://localhost:1111/localhost:2111)"));
transport.setTransportListener(new TransportListener() {
public void onCommand(Object command) {
}
public void onException(IOException error) {
}
public void transportInterupted() {
}
public void transportResumed() {
}
});
failoverTransport = transport.narrow(FailoverTransport.class);
transport.start();
}
protected Transport createTransport() throws Exception {
Transport transport = TransportFactory.connect(
new URI("failover://(tcp://localhost:1234?transport.connectTimeout=10000)"));