Author: ay Date: Fri Jan 27 19:38:26 2012 New Revision: 1236857 URL: http://svn.apache.org/viewvc?rev=1236857&view=rev Log: 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.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 19:38:26 2012 @@ -1,2 +1,2 @@ -/cxf/branches/2.5.x-fixes:1236643 -/cxf/trunk:1236624 +/cxf/branches/2.5.x-fixes:1236643,1236851 +/cxf/trunk:1236624,1236849 Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java?rev=1236857&r1=1236856&r2=1236857&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java (original) +++ cxf/branches/2.4.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java Fri Jan 27 19:38:26 2012 @@ -50,14 +50,17 @@ import org.easymock.EasyMock; import org.easymock.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 }; @@ -73,6 +76,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,
