@BeforeClass(alwaysRun = true) public void setEnvironment() throws Exception { /** * The configuration contains 'simpleStockPassthroug' proxy, which connects to port 5000 here * two tcpmon listener are started in port 5000 target port 8000, in port 8000 target port 9001 * the 2nd listeners target port is not the actual service port, because by making the 2nd * tcpmon listener to connect to a non existing port we could simulate the 101508 error. * * <p>Without the fix of ESBJAVA-4394, when a 101508 happens the response is not send back to * the client. (client gets empty response) */ init(); loadESBConfigurationFromClasspath( "artifacts" + File.separator + "ESB" + File.separator + "passthru" + File.separator + "transport" + File.separator + "ESBJAVA4394-config.xml"); tcpMonListener1 = new TCPMonListener(5000, "localhost", 8000); tcpMonListener1.start(); tcpMonListener2 = new TCPMonListener(8000, "localhost", 9001); tcpMonListener2.start(); }
@AfterClass(alwaysRun = true) public void stop() throws Exception { cleanup(); tcpMonListener1.stop(); tcpMonListener2.stop(); }