From ba9208e33e2a7a5e139e79ecf230d2f1ca59e224 Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Thu, 4 Nov 2010 21:33:15 +0000 Subject: [PATCH] Update TestRemotePortForwarding test --- .../Renci.SshClient.Tests/PortForwardingTest.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Renci.SshClient/Renci.SshClient.Tests/PortForwardingTest.cs b/Renci.SshClient/Renci.SshClient.Tests/PortForwardingTest.cs index 32dafb95..cd6325b2 100644 --- a/Renci.SshClient/Renci.SshClient.Tests/PortForwardingTest.cs +++ b/Renci.SshClient/Renci.SshClient.Tests/PortForwardingTest.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using System.IO; using System.Net; -using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Renci.SshClient.Tests @@ -103,7 +102,7 @@ namespace Renci.SshClient.Tests var client = CreateShellUsingPassword(); client.Connect(); - var port1 = client.AddForwardedPort(8082, "www.renci1.org", 80); + var port1 = client.AddForwardedPort(8082, "www.renci.org", 80); port1.Exception += delegate(object sender, ExceptionEventArgs e) { Assert.Fail(e.Exception.ToString()); @@ -111,10 +110,10 @@ namespace Renci.SshClient.Tests port1.Start(); System.Threading.Tasks.Parallel.For(0, 100, - new ParallelOptions - { - MaxDegreeOfParallelism = 1, - }, + //new ParallelOptions + //{ + // MaxDegreeOfParallelism = 1, + //}, (counter) => { var start = DateTime.Now; @@ -122,16 +121,16 @@ namespace Renci.SshClient.Tests { var result = client.Shell.Execute("wget -O- http://localhost:8082"); + var end = DateTime.Now; + Debug.Write(string.Format("Length: {0}", result.Length)); } catch (Exception exp) { throw; } - var end = DateTime.Now; } ); - } private static byte[] ReadStream(Stream stream)