2007-11-02 Robert Jordan <robertj@gmx.net>
authorRobert Jordan <robertj@gmx.net>
Fri, 2 Nov 2007 00:28:43 +0000 (00:28 -0000)
committerRobert Jordan <robertj@gmx.net>
Fri, 2 Nov 2007 00:28:43 +0000 (00:28 -0000)
* ProcessTest.cs (TestRedirectedOutputIsAsync):
Instrument to see why the build bots are failing.

svn path=/trunk/mcs/; revision=88703

mcs/class/System/Test/System.Diagnostics/ChangeLog
mcs/class/System/Test/System.Diagnostics/ProcessTest.cs

index 1a3f01e5556f693576d217d0072736c69f7dd0ba..2ad2b7756a03f0fcdfb170425b4fe0326af36752 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-02  Robert Jordan  <robertj@gmx.net>
+
+       * ProcessTest.cs (TestRedirectedOutputIsAsync):
+       Instrument to see why the build bots are failing.
+
 2007-11-01  Robert Jordan  <robertj@gmx.net>
 
        * ProcessTest.cs (TestRedirectedOutputIsAsync):
index f4c28f0e428da356909c3b6d69873ab1627d8748..a729bf5bcbd46baf7b3d1c6164f200266ca080fa 100644 (file)
@@ -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;
        }
 }