mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 09:59:48 -05:00
This is another large code review. I want to make a few more changes, but since these changes will stand on their own, I'll hold back on making this change set any larger than it already is. Changes in this request: To address Microsoft/vscode-mssql#326, instead of doing taskkill on the service layer when WaitForExit is executed, we now make an educated guess at which service layer was spawned when the test starts and do a Process.Kill on it when we shut down the test. All the perf tests have been moved into a new project. This was done to keep them easily separated from code coverage test runs. At the same time the perf tests were separated into separate classes for logical categorization. This process will likely be repeated on the stress tests. The tests can still easily be ran from Visual Studio Test Explorer To address Microsoft/vscode-mssql#349, a new SelfCleaningFile class was created to allow for easy cleanup of temporary files generated for integration tests via using blocks. Due to some of the refactoring done while moving the perf tests to a new project, the TestBase class had to be switched to more of a helper class style. As such, all tests that use inherit from TestBase now create a TestBase object on start via a using block. This also simplifies the cleanup at the end of the test. * Solution for hanging code coverage runs Code coverage runs would hang in certain scenarios if a test failed before the service process could be spawned. The taskkill command would fail to find the service process. The test would then wait for opencover to exit, but it would not since the service process it had spawned would still be running, causing the test run to hang indefinitely. Solution was to capture the service process after it launched and explicitly kill it when shutting down the test driver. * Setting the test name in the propery in the class and removign the parameter from each method * New project for perf tests * Reworking integration tests to cleanup temp files * Changes as per @llali review comments * Adding copyright notices * Renaming TestBase => TestHelper * Renaming SelfCleaningFile => SelfCleaningTempFile * Removing code that sets TestName property * Fixing compilation error due to removed code
20 lines
853 B
C#
20 lines
853 B
C#
using System.Reflection;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
// General Information about an assembly is controlled through the following
|
|
// set of attributes. Change these attribute values to modify the information
|
|
// associated with an assembly.
|
|
[assembly: AssemblyConfiguration("")]
|
|
[assembly: AssemblyCompany("")]
|
|
[assembly: AssemblyProduct("Microsoft.SqlTools.ServiceLayer.PerfTests")]
|
|
[assembly: AssemblyTrademark("")]
|
|
|
|
// Setting ComVisible to false makes the types in this assembly not visible
|
|
// to COM components. If you need to access a type in this assembly from
|
|
// COM, set the ComVisible attribute to true on that type.
|
|
[assembly: ComVisible(false)]
|
|
|
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
[assembly: Guid("7e5968ab-83d7-4738-85a2-416a50f13d2f")]
|