Drop ref to Web.UI from integration tests (#11413)

* Remove reference to Web.UI, Fix test server content root

* Cleanup test databases in parallel
This commit is contained in:
Paul Johnson
2021-10-19 10:09:48 +01:00
parent afe43ab8cf
commit 687de61793
4 changed files with 17 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ using System.Collections.Concurrent;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence;
@@ -118,13 +119,13 @@ namespace Umbraco.Cms.Tests.Integration.Testing
string filename = Path.Combine(s_filesPath, DatabaseName).ToUpper();
foreach (string database in s_localDbInstance.GetDatabases())
Parallel.ForEach(s_localDbInstance.GetDatabases(), instance =>
{
if (database.StartsWith(filename))
if (instance.StartsWith(filename))
{
s_localDbInstance.DropDatabase(database);
s_localDbInstance.DropDatabase(instance);
}
}
});
_localDb.StopInstance(InstanceName);

View File

@@ -6,6 +6,7 @@ using System.Collections.Concurrent;
using System.Data.SqlClient;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence;
@@ -118,10 +119,7 @@ namespace Umbraco.Cms.Tests.Integration.Testing
{
}
foreach (TestDbMeta testDatabase in _testDatabases)
{
Drop(testDatabase);
}
Parallel.ForEach(_testDatabases, Drop);
}
}
}