[mono/mono] [2 commits] d4ed8a8e: [System.Configuration/Test] Try to track down failure in buildbot

"Marek Safar ([email protected])" <[email protected]> Thu, 14 Nov 2013 12:43:10 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <0000014256a2f8fe-2a71053f-a35a-423c-a23f-b499499d7cd8-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/0927129c35f5...5659b9a9ea79

   Commit: d4ed8a8e9e18e40fa91d791b18a2fa1e58a44174
   Author: AndrĂ©s G. Aragoneses <[email protected]> (knocte)
     Date: 2013-11-14 12:08:07 GMT
      URL: https://github.com/mono/mono/commit/d4ed8a8e9e18e40fa91d791b18a2fa1e58a44174

[System.Configuration/Test] Try to track down failure in buildbot

This TestConnectionStringRetrieval unit test (committed by me some months
ago) succeeds for me in a clean checkout, but I don't understand why it
fails in the buildbot, so let's place some sanity check in it.

Changed paths:
  M mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs

Modified: mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs
===================================================================
@@ -37,6 +37,7 @@
 using NUnit.Framework;
 using SysConfig = System.Configuration.Configuration;
 using System.Runtime.InteropServices;
+using System.Reflection;
 
 namespace MonoTests.System.Configuration {
 	using Util;
@@ -616,6 +617,11 @@ public void TestContext (string label)
 		[Test]
 		public void TestConnectionStringRetrieval ()
 		{
+			var currentAssembly = Assembly.GetExecutingAssembly().Location;
+			Assert.IsTrue (File.Exists (currentAssembly + ".config"),
+			               String.Format ("This test cannot succeed without the .config file being in the same place as the assembly ({0})",
+			                              currentAssembly));
+
 			var connStringObj = ConfigurationManager.ConnectionStrings ["test-connstring"];
 			Assert.IsNotNull (connStringObj);
 			var connString = connStringObj.ConnectionString;

   Commit: 5659b9a9ea7978fe1849947a44246fc4ed83ce29
   Author: Marek Safar <[email protected]> (marek-safar)
     Date: 2013-11-14 12:41:06 GMT
      URL: https://github.com/mono/mono/commit/5659b9a9ea7978fe1849947a44246fc4ed83ce29

Merge pull request #808 from knocte/master

[System.Configuration/Test] Try to track down failure in buildbot

Changed paths:
  M mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs

Modified: mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs
===================================================================
@@ -37,6 +37,7 @@
 using NUnit.Framework;
 using SysConfig = System.Configuration.Configuration;
 using System.Runtime.InteropServices;
+using System.Reflection;
 
 namespace MonoTests.System.Configuration {
 	using Util;
@@ -616,6 +617,11 @@ public void TestContext (string label)
 		[Test]
 		public void TestConnectionStringRetrieval ()
 		{
+			var currentAssembly = Assembly.GetExecutingAssembly().Location;
+			Assert.IsTrue (File.Exists (currentAssembly + ".config"),
+			               String.Format ("This test cannot succeed without the .config file being in the same place as the assembly ({0})",
+			                              currentAssembly));
+
 			var connStringObj = ConfigurationManager.ConnectionStrings ["test-connstring"];
 			Assert.IsNotNull (connStringObj);
 			var connString = connStringObj.ConnectionString;
_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches