Author: keith Date: Sat May 31 09:47:42 2008 New Revision: 17706 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17706
Log: Reverting the testConnect Method as the new one causes java heap size issues Modified: trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/IntegrationTestSuite.java Modified: trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/IntegrationTestSuite.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/IntegrationTestSuite.java?rev=17706&r1=17705&r2=17706&view=diff ============================================================================== --- trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/IntegrationTestSuite.java (original) +++ trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/IntegrationTestSuite.java Sat May 31 09:47:42 2008 @@ -33,12 +33,6 @@ import java.net.MalformedURLException; import java.net.URL; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebRequest; -import com.meterware.httpunit.GetMethodWebRequest; -import com.meterware.httpunit.WebResponse; - public class IntegrationTestSuite extends TestCase implements IntegrationTestConstants { private static Main main; @@ -79,17 +73,28 @@ public static void testConnect(String epr) throws Exception { + URL url; + try { + url = new URL(epr); + } catch (MalformedURLException e) { + throw new Exception(e); + } while (true) { try { - WebConversation wc = new WebConversation(); - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - WebRequest request = - new GetMethodWebRequest(epr); - wc.getResponse(request); + HttpURLConnection httpCon; + httpCon = (HttpURLConnection) url.openConnection(); + httpCon.setDoOutput(true); + httpCon.setDoInput(true); + httpCon.setUseCaches(false); + httpCon.setRequestMethod("GET"); + HttpURLConnection.setFollowRedirects(true); + + httpCon.connect(); + httpCon.disconnect(); Thread.sleep(1000); break; - } catch (Exception e) { + } catch (IOException e) { try { Thread.sleep(2000); } catch (InterruptedException e1) { @@ -97,6 +102,7 @@ } } } + Thread.sleep(4000); } public void testEmpty() throws Exception { _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
