Author: dkulp Date: Fri Feb 17 15:24:44 2012 New Revision: 1245606 URL: http://svn.apache.org/viewvc?rev=1245606&view=rev Log: Merged revisions 1236857 via svn merge from https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes
........ r1236857 | ay | 2012-01-27 14:38:26 -0500 (Fri, 27 Jan 2012) | 16 lines Merged revisions 1236851 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes ................ r1236851 | ay | 2012-01-27 20:34:40 +0100 (Fri, 27 Jan 2012) | 9 lines Merged revisions 1236849 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1236849 | ay | 2012-01-27 20:26:11 +0100 (Fri, 27 Jan 2012) | 1 line make HTTPConduitURLEasyMockTest work when proxy is active ........ ................ ........ Modified: cxf/branches/2.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java Propchange: cxf/branches/2.3.x-fixes/ ('svn:mergeinfo' removed) Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java?rev=1245606&r1=1245605&r2=1245606&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java (original) +++ cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java Fri Feb 17 15:24:44 2012 @@ -48,14 +48,17 @@ import org.easymock.classextension.EasyM import org.easymock.classextension.IMocksControl; import org.junit.After; +import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; /** */ public class HTTPConduitURLEasyMockTest extends Assert { - + private static String oldHttpProxyHost; + private enum ResponseStyle { NONE, BACK_CHANNEL, BACK_CHANNEL_ERROR, DECOUPLED }; private enum ResponseDelimiter { LENGTH, CHUNKED, EOF }; @@ -71,6 +74,22 @@ public class HTTPConduitURLEasyMockTest private OutputStream os; private InputStream is; + @BeforeClass + public static void disableHttpProxy() throws Exception { + oldHttpProxyHost = System.getProperty("http.proxyHost"); + if (oldHttpProxyHost != null) { + // disable http proxy so that the connection mocking works (see setUpConduit) + System.clearProperty("http.proxyHost"); + } + } + + @AfterClass + public static void revertHttpProxy() throws Exception { + if (oldHttpProxyHost != null) { + System.setProperty("http.proxyHost", oldHttpProxyHost); + } + } + /** * This is an extension to the HTTPConduit that replaces * the dynamic assignment of the HttpURLConnectionFactory,
