From: Robert Jordan Date: Fri, 2 Nov 2007 00:28:43 +0000 (-0000) Subject: 2007-11-02 Robert Jordan X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=a042cffb4c920bd402f288e3a44d5b470e7b74ae;p=mono.git 2007-11-02 Robert Jordan * ProcessTest.cs (TestRedirectedOutputIsAsync): Instrument to see why the build bots are failing. svn path=/trunk/mcs/; revision=88703 --- diff --git a/mcs/class/System/Test/System.Diagnostics/ChangeLog b/mcs/class/System/Test/System.Diagnostics/ChangeLog index 1a3f01e5556..2ad2b7756a0 100644 --- a/mcs/class/System/Test/System.Diagnostics/ChangeLog +++ b/mcs/class/System/Test/System.Diagnostics/ChangeLog @@ -1,3 +1,8 @@ +2007-11-02 Robert Jordan + + * ProcessTest.cs (TestRedirectedOutputIsAsync): + Instrument to see why the build bots are failing. + 2007-11-01 Robert Jordan * ProcessTest.cs (TestRedirectedOutputIsAsync): diff --git a/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs b/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs index f4c28f0e428..a729bf5bcbd 100644 --- a/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs @@ -76,14 +76,17 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue ((DateTime.Now - start).TotalMilliseconds < 1000, "#01 BeginRead was not async"); p.WaitForExit (); Assert.AreEqual (0, p.ExitCode, "#02 script failure"); - - Assert.AreEqual ("hello", Encoding.Default.GetString (buffer, 0, 5), "#03"); + if (bytesRead < "hello".Length) + Assert.Fail ("#03 got {0} bytes", bytesRead); + Assert.AreEqual ("hello", Encoding.Default.GetString (buffer, 0, 5), "#04"); } void Read (IAsyncResult ar) { Stream stm = (Stream) ar.AsyncState; - stm.EndRead (ar); + bytesRead = stm.EndRead (ar); } + + int bytesRead = Int32.MinValue; } }