Skip to content
Permalink
Browse files
Reenabled the connection monitoring in the HTTP tests (revert of r778…
…520).
  • Loading branch information
veithen committed May 15, 2010
1 parent 8caf4cc commit 233c7bfb5f762828393ad5719239b782dc560f53
Showing 1 changed file with 7 additions and 7 deletions.
@@ -19,6 +19,7 @@

package org.apache.axis2.transport.testkit.http;

import java.net.InetSocketAddress;
import java.util.UUID;

import org.apache.axis2.addressing.EndpointReference;
@@ -27,30 +28,29 @@
import org.apache.axis2.transport.testkit.tests.Setup;
import org.apache.axis2.transport.testkit.tests.TearDown;
import org.apache.axis2.transport.testkit.tests.Transient;
import org.apache.axis2.transport.testkit.util.tcpmon.Tunnel;

public class HttpChannel implements AsyncChannel, RequestResponseChannel {
private int serverPort;
private @Transient String serviceName;
// private @Transient Tunnel tunnel;
private @Transient Tunnel tunnel;

@Setup @SuppressWarnings("unused")
private void setUp(HttpTestEnvironment env) throws Exception {
serverPort = env.getServerPort();
serviceName = "TestService-" + UUID.randomUUID();
// tunnel = new Tunnel(new InetSocketAddress("127.0.0.1", 8280));
// tunnel.start();
tunnel = new Tunnel(new InetSocketAddress("127.0.0.1", env.getServerPort()));
tunnel.start();
}

@TearDown @SuppressWarnings("unused")
private void tearDown() throws Exception {
// tunnel.stop();
tunnel.stop();
}

public String getServiceName() {
return serviceName;
}

public EndpointReference getEndpointReference() throws Exception {
return new EndpointReference("http://localhost:" + /* tunnel.getPort() */ serverPort + CONTEXT_PATH + "/" + serviceName);
return new EndpointReference("http://localhost:" + tunnel.getPort() + CONTEXT_PATH + "/" + serviceName);
}
}

0 comments on commit 233c7bf

Please sign in to comment.