[System.Data] Try to fix random DataViewTest.DefaultColumnNameAddListChangedTest...
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Wed, 25 Nov 2015 16:57:33 +0000 (17:57 +0100)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Wed, 25 Nov 2015 16:59:06 +0000 (17:59 +0100)
It looks like the GC might be involved somehow in these random
failures, so make sure objects aren't freed too early.

mcs/class/System.Data/Test/System.Data/DataViewTest.cs

index 123c878050b2034e394c84ef7eafdfd7bfe6469e..4be1824f6674c064bd460a4a3f0cab070727b250 100644 (file)
@@ -983,6 +983,7 @@ table was set.
                        eventWriter.WriteLine (" add a column with an empty name.");
 
                        AssertEquals (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
+                       GC.KeepAlive (dv);
                }
 
                public class ComplexEventSequence1View : DataView