Connect on 2.0 doesn't work ... sometimes?
Posted: Sat  16 Jun 2007 22:25
				
				I'm trying to run unit tests with CoreLab.MySql 3.50.13.0.  Under NUnit 2.2.8 and .NET 1.1 with the 1.x version of CoreLab.MySql, it works fine.  Under .NET 2.0 and NUnit 2.4.1, this test fails.  It fails from the Assert, not from an exception thrown by Open()!  If I run it in the debugger, and manually execute "conn.Open()" in the Immediate Window, it changes the state to Open.  However when I step over the executable line itself does not.
I can run a web app under 2.0 and connect using the same connection string, so I am thinking it has something to do with running the code under NUnit and .NET 2.0.
Any ideas would be appreciated.
			I can run a web app under 2.0 and connect using the same connection string, so I am thinking it has something to do with running the code under NUnit and .NET 2.0.
Code: Select all
namespace Inv.Core.DM.User.UnitTests {
[TestFixture] public class SitewideUserTests {
[Test] public void TestCorelab()
{
	using (CoreLab.MySql.MySqlConnection conn = new CoreLab.MySql.MySqlConnection("Data Source=[ipaddr];Database=[db];User ID=[user];Password=[pw]"))
	{
		conn.Open();
		Assert.AreEqual(ConnectionState.Open, conn.State);
	}
} // test method
} // class
} // namespace