Added:
branches/1.0/TestSuite/configs/
branches/1.0/TestSuite/configs/mysql-50.config
branches/1.0/TestSuite/configs/mysql-51.config
Modified:
branches/1.0/Client.build
branches/1.0/TestSuite/BaseTest.cs
branches/1.0/TestSuite/BlobTests.cs
branches/1.0/TestSuite/CommandTests.cs
branches/1.0/TestSuite/PreparedStatements.cs
branches/1.0/TestSuite/StressTests.cs
Log:
ported over the config changes that were already made in the 5.0 trunk. These changes allow the test suite to run with the CI setup.
Modified: branches/1.0/Client.build
===================================================================
--- branches/1.0/Client.build 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/Client.build 2006-12-07 21:38:17 UTC (rev 484)
@@ -60,7 +60,7 @@
<sources refid="Source"/>
</csc>
<csc output="${outdir}/MySql.Data.Tests.dll" target="library"
- debug="${debug}" optimize="${opt}"> <arg value="/nowarn:0679"/>
+ debug="${debug}" define="${defines}" optimize="${opt}"> <arg value="/nowarn:0679"/>
<sources>
<include name="TestSuite/*.cs" />
</sources>
@@ -141,43 +141,41 @@
-->
<target name="testclient" description="Target to run NUnit tests">
<mkdir dir="results"/>
- <echo message="Stopping all services"/>
<property name="nunit-lib" value="${nunit.dir}/bin"/>
<property name="doCoverage" value="false"/>
- <servicecontroller action="Stop" service="MySql4.1"/>
- <servicecontroller action="Stop" service="MySql5.0"/>
- <servicecontroller action="Stop" service="MySql5.1"/>
- <echo message="Testing MySQL 4.1"/>
- <servicecontroller action="Start" service="MySql4.1"/>
+<!-- <echo message="Testing MySQL 4.1"/>
<property name="excludes" value="5.0,NotWorking"/>
- <call target="testdb"/>
+ <call target="testdb"/> -->
<echo message="Testing MySQL 5.0"/>
- <servicecontroller action="Stop" service="MySql4.1"/>
- <servicecontroller action="Start" service="MySql5.0"/>
<property name="excludes" value="NotWorking"/>
+ <property name="config" value="mysql-50.config"/>
<!--<property name="doCoverage" value="true"/>-->
<call target="testdb"/>
- <echo message="Testing MySQL 5.1"/>
- <servicecontroller action="Stop" service="MySql5.0"/>
- <servicecontroller action="Start" service="MySql5.1"/>
- <property name="excludes" value="NotWorking"/>
- <call target="testdb"/>
- </target>
+ <echo message="Testing MySQL 5.1"/>
+ <property name="excludes" value="NotWorking"/>
+ <property name="config" value="mysql-51.config"/>
+ <call target="testdb"/>
+ </target>
<!--
execute the test suite against a single database instance, possibly using
coverage
-->
<target name="testdb" description="Target to test a database with all possible configurations">
+ <copy overwrite="true" file="testsuite/configs/${config}" tofile="mysqlclient/bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/>
<property name="nunit-exe" value="${nunit.dir}/bin/nunit-console.exe"/>
<property name="nunit-exe" value="${nunit.dir}/mono/bin/nunit-console.exe" if="${string::contains(framework, 'mono')}"/>
- <exec unless="${doCoverage}" program="${nunit-exe}"
- commandline="/exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml bin/${framework}/${buildType}/MySql.Data.Tests.dll"
- failonerror="true"/>
+ <exec unless="${doCoverage}" program="${nunit-exe}" workingdir="mysqlclient/bin/${framework}/${buildType}"
+ failonerror="true">
+ <arg value="/exclude=${excludes}"/>
+ <arg value="MySql.Data.Tests.dll"/>
+ <arg value="/xml=${framework}-nunit-results.xml"/>
+ <arg value="/nologo"/>
+ </exec>
<exec if="${doCoverage}" program="${ncover.executable}"
commandline="/c "${nunit-exe}" "bin/${framework}/${buildType}/MySql.Data.Tests.dll /exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml" /a MySql.Data /o results/ncover-${framework}-${config}.xml"
failonerror="true"/>
Modified: branches/1.0/TestSuite/BaseTest.cs
===================================================================
--- branches/1.0/TestSuite/BaseTest.cs 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/BaseTest.cs 2006-12-07 21:38:17 UTC (rev 484)
@@ -37,29 +37,65 @@
protected string host;
protected string user;
protected string password;
+ protected int port;
+ protected string database;
+ protected string pipeName;
+ protected string memoryName;
public BaseTest()
{
- csAdditions = ";pooling=false";
+ csAdditions = ";pooling=false;";
user = "root";
password = "";
host = "localhost";
- }
+ database = "test";
+ port = 3306;
+ pipeName = "MYSQL";
+ memoryName = "MYSQL";
+#if NET20
+ string strPort = ConfigurationManager.AppSettings["port"];
+ string strDatabase = ConfigurationManager.AppSettings["database"];
+ string strUserId = ConfigurationManager.AppSettings["userid"];
+ string strPassword = ConfigurationManager.AppSettings["password"];
+ string strPipeName = ConfigurationManager.AppSettings["pipename"];
+ string strMemName = ConfigurationManager.AppSettings["memory_name"];
+#else
+ string strPort = ConfigurationSettings.AppSettings["port"];
+ string strDatabase = ConfigurationSettings.AppSettings["database"];
+ string strUserId = ConfigurationSettings.AppSettings["userid"];
+ string strPassword = ConfigurationSettings.AppSettings["password"];
+ string strPipeName = ConfigurationSettings.AppSettings["pipename"];
+ string strMemName = ConfigurationSettings.AppSettings["memory_name"];
+#endif
+ if (strPort != null)
+ port = Int32.Parse(strPort);
+ if (strDatabase != null)
+ database = strDatabase;
+ if (strUserId != null)
+ user = strUserId;
+ if (strPassword != null)
+ password = strPassword;
+ if (strPipeName != null)
+ pipeName = strPipeName;
+ if (strMemName != null)
+ memoryName = strMemName;
+ }
+
protected virtual string GetConnectionInfo()
{
- return String.Empty;
- }
+ return String.Format("protocol=tcp;port={0}", port);
+ }
protected string GetConnectionString(bool includedb)
{
- string connStr = String.Format("server={0};user id={1};password={2};" +
- "persist security info=true;{3}", host, user, password, csAdditions);
- if (includedb)
- connStr += ";database=test;compress=true";
- connStr += GetConnectionInfo();
- return connStr;
- }
+ string connStr = String.Format("server={0};user id={1};password={2};" +
+ "persist security info=true;{3}", host, user, password, csAdditions);
+ if (includedb)
+ connStr += String.Format("database={0};", database);
+ connStr += GetConnectionInfo();
+ return connStr;
+ }
protected void Open()
{
Modified: branches/1.0/TestSuite/BlobTests.cs
===================================================================
--- branches/1.0/TestSuite/BlobTests.cs 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/BlobTests.cs 2006-12-07 21:38:17 UTC (rev 484)
@@ -404,55 +404,55 @@
}
}
- #region Configs
+ #region Configs
- [Category("Compressed")]
- public class BlobTestsSocketCompressed : BlobTests
- {
- protected override string GetConnectionInfo()
- {
- return ";port=3306;compress=true";
- }
- }
+ [Category("Compressed")]
+ public class BlobTestsSocketCompressed : BlobTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("port={0};compress=true", port);
+ }
+ }
- [Category("Pipe")]
- public class BlobTestsPipe : BlobTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe";
- }
- }
+ [Category("Pipe")]
+ public class BlobTestsPipe : BlobTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0}", pipeName);
+ }
+ }
- [Category("Compressed")]
- [Category("Pipe")]
- public class BlobTestsPipeCompressed : BlobTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("Pipe")]
+ public class BlobTestsPipeCompressed : BlobTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0};compress=true", pipeName);
+ }
+ }
- [Category("SharedMemory")]
- public class BlobTestsSharedMemory : BlobTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory";
- }
- }
+ [Category("SharedMemory")]
+ public class BlobTestsSharedMemory : BlobTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0}", memoryName);
+ }
+ }
- [Category("Compressed")]
- [Category("SharedMemory")]
- public class BlobTestsSharedMemoryCompressed : BlobTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("SharedMemory")]
+ public class BlobTestsSharedMemoryCompressed : BlobTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0};compress=true", memoryName);
+ }
+ }
- #endregion
+ #endregion
}
\ No newline at end of file
Modified: branches/1.0/TestSuite/CommandTests.cs
===================================================================
--- branches/1.0/TestSuite/CommandTests.cs 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/CommandTests.cs 2006-12-07 21:38:17 UTC (rev 484)
@@ -385,55 +385,55 @@
}
- #region Configs
+ #region Configs
- [Category("Compressed")]
- public class CommandTestsSocketCompressed : CommandTests
- {
- protected override string GetConnectionInfo()
- {
- return ";port=3306;compress=true";
- }
- }
+ [Category("Compressed")]
+ public class CommandTestsSocketCompressed : CommandTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("port={0};compress=true", port);
+ }
+ }
- [Category("Pipe")]
- public class CommandTestsPipe : CommandTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe";
- }
- }
+ [Category("Pipe")]
+ public class CommandTestsPipe : CommandTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0}", pipeName);
+ }
+ }
- [Category("Compressed")]
- [Category("Pipe")]
- public class CommandTestsPipeCompressed : CommandTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("Pipe")]
+ public class CommandTestsPipeCompressed : CommandTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0};compress=true", pipeName);
+ }
+ }
- [Category("SharedMemory")]
- public class CommandTestsSharedMemory : CommandTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory";
- }
- }
+ [Category("SharedMemory")]
+ public class CommandTestsSharedMemory : CommandTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0}", memoryName);
+ }
+ }
- [Category("Compressed")]
- [Category("SharedMemory")]
- public class CommandTestsSharedMemoryCompressed : CommandTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("SharedMemory")]
+ public class CommandTestsSharedMemoryCompressed : CommandTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0};compress=true", memoryName);
+ }
+ }
- #endregion
+ #endregion
}
Modified: branches/1.0/TestSuite/PreparedStatements.cs
===================================================================
--- branches/1.0/TestSuite/PreparedStatements.cs 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/PreparedStatements.cs 2006-12-07 21:38:17 UTC (rev 484)
@@ -716,55 +716,55 @@
}
}
- #region Configs
+ #region Configs
- [Category("Compressed")]
- public class PreparedStatementsSocketCompressed : PreparedStatements
- {
- protected override string GetConnectionInfo()
- {
- return ";port=3306;compress=true";
- }
- }
+ [Category("Compressed")]
+ public class PreparedStatementsSocketCompressed : PreparedStatements
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("port={0};compress=true", port);
+ }
+ }
- [Category("Pipe")]
- public class PreparedStatementsPipe : PreparedStatements
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe";
- }
- }
+ [Category("Pipe")]
+ public class PreparedStatementsPipe : PreparedStatements
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0}", pipeName);
+ }
+ }
- [Category("Compressed")]
- [Category("Pipe")]
- public class PreparedStatementsPipeCompressed : PreparedStatements
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("Pipe")]
+ public class PreparedStatementsPipeCompressed : PreparedStatements
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0};compress=true", pipeName);
+ }
+ }
- [Category("SharedMemory")]
- public class PreparedStatementsSharedMemory : PreparedStatements
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory";
- }
- }
+ [Category("SharedMemory")]
+ public class PreparedStatementsSharedMemory : PreparedStatements
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0}", memoryName);
+ }
+ }
- [Category("Compressed")]
- [Category("SharedMemory")]
- public class PreparedStatementsSharedMemoryCompressed : PreparedStatements
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("SharedMemory")]
+ public class PreparedStatementsSharedMemoryCompressed : PreparedStatements
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0};compress=true", memoryName);
+ }
+ }
- #endregion
+ #endregion
}
Modified: branches/1.0/TestSuite/StressTests.cs
===================================================================
--- branches/1.0/TestSuite/StressTests.cs 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/StressTests.cs 2006-12-07 21:38:17 UTC (rev 484)
@@ -115,55 +115,55 @@
}
}
- #region Configs
+ #region Configs
- [Category("Compressed")]
- public class StressTestsSocketCompressed : StressTests
- {
- protected override string GetConnectionInfo()
- {
- return ";port=3306;compress=true";
- }
- }
+ [Category("Compressed")]
+ public class StressTestsSocketCompressed : StressTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("port={0};compress=true", port);
+ }
+ }
- [Category("Pipe")]
- public class StressTestsPipe : StressTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe";
- }
- }
+ [Category("Pipe")]
+ public class StressTestsPipe : StressTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0}", pipeName);
+ }
+ }
- [Category("Compressed")]
- [Category("Pipe")]
- public class StressTestsPipeCompressed : StressTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=pipe;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("Pipe")]
+ public class StressTestsPipeCompressed : StressTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=pipe;pipe name={0};compress=true", pipeName);
+ }
+ }
- [Category("SharedMemory")]
- public class StressTestsSharedMemory : StressTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory";
- }
- }
+ [Category("SharedMemory")]
+ public class StressTestsSharedMemory : StressTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0}", memoryName);
+ }
+ }
- [Category("Compressed")]
- [Category("SharedMemory")]
- public class StressTestsSharedMemoryCompressed : StressTests
- {
- protected override string GetConnectionInfo()
- {
- return ";protocol=memory;compress=true";
- }
- }
+ [Category("Compressed")]
+ [Category("SharedMemory")]
+ public class StressTestsSharedMemoryCompressed : StressTests
+ {
+ protected override string GetConnectionInfo()
+ {
+ return String.Format("protocol=memory; shared memory name={0};compress=true", memoryName);
+ }
+ }
- #endregion
+ #endregion
}
Added: branches/1.0/TestSuite/configs/mysql-50.config
===================================================================
--- branches/1.0/TestSuite/configs/mysql-50.config 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/configs/mysql-50.config 2006-12-07 21:38:17 UTC (rev 484)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="port" value="3328"/>
+ <add key="userid" value="test"/>
+ <add key="password" value="test"/>
+ <add key="database" value="test11"/>
+ <add key="pipename" value="MYSQL50"/>
+ <add key="memory_name" value="MYSQL50"/>
+ </appSettings>
+</configuration>
\ No newline at end of file
Added: branches/1.0/TestSuite/configs/mysql-51.config
===================================================================
--- branches/1.0/TestSuite/configs/mysql-51.config 2006-12-07 20:53:54 UTC (rev 483)
+++ branches/1.0/TestSuite/configs/mysql-51.config 2006-12-07 21:38:17 UTC (rev 484)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="port" value="3329"/>
+ <add key="userid" value="test"/>
+ <add key="password" value="test"/>
+ <add key="database" value="test11"/>
+ <add key="pipename" value="MYSQL51"/>
+ <add key="memory_name" value="MYSQL51"/>
+ </appSettings>
+</configuration>
\ No newline at end of file
| Thread |
|---|
| • Connector/NET commit: r484 - in branches/1.0: . TestSuite TestSuite/configs | rburnett | 7 Dec |