Commit Graph

12 Commits

Author SHA1 Message Date
Aditya Bist
97fa99a713 fixed failing integration tests (#512)
* fixed failing integration tests

* close connection after test

* undo close connection
2017-10-21 11:10:38 -07:00
Kevin Cunnane
d222af7824 Fix numerous Azure property issues (#511)
* Avoid crashing if azure edition is System.

* Add new Azure-specific options to the prototype and return through the service calls

* Send azure properties over database info request

* IsCloud should include Azure SQL DW
- Fixed references to this feature flag
- Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
2017-10-19 22:08:33 -07:00
Leila Lali
f09b9f4c30 Fixing the bug with connections on database make restore fail (#473)
* closing the connections that don't need to be open and keeping track of the connections that should stay open
2017-10-05 20:06:31 -07:00
Benjamin Russell
b49fa89be9 Fixing a handful of warnings that showed up since the upgrade to .NET Core 2 (#411) 2017-07-14 09:53:26 -07:00
Kevin Cunnane
0f706f28ee Merge from Master 2017-03-06 17:56:04 -08:00
Benjamin Russell
1166778249 Isolate Shared Test Code (#252)
The goal of this make sure that test code is correctly organized to ensure that test suites aren't dependent on each other.
* UnitTests get their own project now (renaming Microsoft.SqlTools.ServiceLayer.Test to Microsoft.SqlTools.ServiceLayer.UnitTests) which is about 90% of the changes to the files.
* IntegrationTests no longer depends on UnitTests, only Test.Common
* Any shared components from TestObjects that spins up a "live" connection has been moved to IntegrationTests Utility/LiveConnectionHelper.cs
* The dictionary-based mock file stream factory has been moved to Test.Common since it is used by UnitTests and IntegrationTests
    * Added a overload that doesn't take a dictionary for when we don't care about monitoring the storage (about 90% of the time)
* The RunIf* wrapper methods have been moved to Test.Common
* OwnerUri and StandardQuery constants have been moved to Test.Common Constants file

* Updating to latest SDK version available at https://www.microsoft.com/net/core#windowscmd

* Moving unit tests to unit test folder

* Changing namespaces to UnitTests

* Moving some constants and shared functionality into common project, making the UnitTests reference it

* Unit tests are working!

* Integration tests are working

* Updating automated test runs

* Fixing one last broken unit test

* Exposing internals for other projects

* Moving edit data tests to UnitTest project

* Applying refactor fixes to unit tests

* Fixing flaky test that wasn't awaiting completion
2017-03-02 13:00:31 -08:00
Kevin Cunnane
dd9f2d55d4 Fix DW connection bug (#258)
- Connection info cache is now per-DB instead of per-server. This has the downside of increasing #queries, but is required in order to correctly handle isSqlDW since this changes for each database on an Azure server.
2017-02-27 23:13:36 -08:00
Leila Lali
dcff5dd915 New tool to store SQL connection configs locally (#218)
* added a new tool to store SQL connections locally. Modified the peek definition tests to create test database before running test


* fixed failing test QueryExecutionPlanInvalidParamsTest

* Fixes based on code review comments

* fixed failing test GetSignatureHelpReturnsNotNullIfParseInfoInitialized
2017-01-25 16:19:27 -08:00
Connor Quagliana
c055c459a0 Update connection logic to handle multiple connections per URI (#176)
* Add CancelTokenKey for uniquely identifying cancelations of Connections associated with an OwnerUri and ConnectionType string.

* Update ConnectionInfo to use ConcurrentDictionary of DbConnection instances. Add wrapper functions for the ConcurrentDictionary. 

* Refactor Connect and Disconnect in ConnectionService.

* Update ConnectionService: Handle multiple connections per ConnectionInfo. Handle cancelation tokens uniquely identified with CancelTokenKey. Add GetOrOpenConnection() for other services to request an existing or create a new DbConnection.

* Add ConnectionType.cs for ConnectionType strings.

* Add ConnectionType string to ConnectParams, ConnectionCompleteNotification, DisconnectParams.

* Update Query ExecuteInternal to use the dedicated query connection and GetOrOpenConnection().

* Update test library to account for multiple connections in ConnectionInfo.

* Write tests ensuring multiple connections don’t create redundant data.

* Write tests ensuring database changes affect all connections of a given ConnectionInfo.

* Write tests for TRANSACTION statements and temp tables.
2017-01-18 17:59:41 -08:00
Leila Lali
b353b2137e New test common project for database connections using the settings.json (#210)
* moved test driver tests and test common classes to separate projects
2017-01-11 13:47:56 -08:00
Benjamin Russell
e71bcefb28 Feature: Progressive Messages (#208)
This change is a reworking of the way that messages are sent to clients from the service layer. It is also a reworking of the protocol to ensure that all formulations of query send back events to the client in a deterministic ordering. To support the first change:
* Added a new event that will be sent when a message is generated
* Messages now indicate which Batch (if any) generated them
* Messages now indicate if they were error level
* Removed message storage in Batch objects and BatchSummary objects
* Batch objects no longer have error state
2017-01-10 16:42:03 -08:00
Connor Quagliana
3ad7cc1a8b Move Integration Tests to dedicated project (#201)
Add IntegrationTests project. Move all tests ifdef'd with LIVE_CONNECTION_TESTS to IntegrationTests project. Delete files that have no remaining code. Update codecoverage.bat to run integration tests
2017-01-04 11:37:57 -08:00