@@ -94,7 +94,7 @@ public async Task Nested_Proxy_Farm_Should_Not_Hang()
9494 var proxies2 = new List < ProxyServer > ( ) ;
9595
9696 //create a level 2 upstream proxy farm that forwards to server
97- for ( int i = 0 ; i < 5 ; i ++ )
97+ for ( int i = 0 ; i < 10 ; i ++ )
9898 {
9999 var proxy2 = testSuite . GetProxy ( ) ;
100100 proxy2 . ProxyBasicAuthenticateFunc += ( _ , _ , _ ) =>
@@ -111,7 +111,7 @@ public async Task Nested_Proxy_Farm_Should_Not_Hang()
111111 for ( int i = 0 ; i < 10 ; i ++ )
112112 {
113113 var proxy1 = testSuite . GetProxy ( ) ;
114- proxy1 . EnableConnectionPool = false ;
114+ // proxy1.EnableConnectionPool = false;
115115 var proxy2 = proxies2 [ rnd . Next ( ) % proxies2 . Count ] ;
116116
117117 var explicitEndpoint = proxy1 . ProxyEndPoints . OfType < ExplicitProxyEndPoint > ( ) . First ( ) ;
@@ -149,12 +149,14 @@ public async Task Nested_Proxy_Farm_Should_Not_Hang()
149149 var tasks = new List < Task > ( ) ;
150150
151151 //send multiple concurrent requests from client => proxy farm 1 => proxy farm 2 => server
152- for ( int j = 0 ; j < 1000 ; j ++ )
152+ for ( int j = 0 ; j < 10_000 ; j ++ )
153153 {
154154 var task = Task . Run ( async ( ) =>
155155 {
156156 var proxy = proxies1 [ rnd . Next ( ) % proxies1 . Count ] ;
157157 using var client = testSuite . GetClient ( proxy ) ;
158+
159+ //if we increase the time out; tests will keep hanging until the timeout ends.
158160 client . Timeout = TimeSpan . FromSeconds ( 30 ) ;
159161 var response = await client . PostAsync ( new Uri ( server . ListeningHttpsUrl ) ,
160162 new StringContent ( "hello server. I am a client." ) ) ;
0 commit comments