Commit Graph

6 Commits

Author SHA1 Message Date
Karl Burtram
151a2de625 Query execution settings support (#812)
* WIP

* WIP 3

* WIP 3

* Additional query settings updates

* Add settings tets

* Address code review feeback

* Updates from testing
2019-05-16 15:21:17 -07:00
Karl Burtram
005fc9e4df Add try/catch blocks for request handlers (#408)
* Add try/catch for request handlers

* Fix test break
2017-07-13 07:18:34 -07:00
Kevin Cunnane
3aba287759 Fix #911 handle perforce files (#400)
- Additional handling of document events with "perforce:" or other SCM strings
- Much of the handling had been added already, but adding in additional validation and ensuring that everywhere `Workspace.GetFile` is called we add a not-null check to avoid null reference errors
2017-07-05 13:25:05 -07:00
Kevin Cunnane
a4c630d5d3 Avoid throwing exception in LangageService for OE connections (#361)
* Ensure connection open for OE queries and fix connection disposal
- Dispose connection in Metadata service, to ensure we cleanly dispose and don't rely on garbage colleciton
- Fixed issue where if the connection was closed, expanding databases in the Server would fail. This is because SMO doesn't always reopen the connection, certainly not for Server level queries. The solution is to always check if open and reopen.
- Added unit tests for this, which required mocking the relevant IsOpen / OpenConnection methods. Refactored SMO wrapper calls into a dedicated class file to handle this

* Avoid throwing exception in LangageService for OE connections
- Handle non-File URIs by skipping language service binding in those cases. Added test for this

- VSCode passes untitled:, git: and other paths, often without a '/'. Updated logic to handle this.

* Handle windows file paths
2017-05-26 13:11:26 -07:00
Karl Burtram
f00136cffb Fix namespaces for code moved to separate class libraries (#263)
* Create ServiceHost a service-specific class

* Renaming hosting namespace

* Rename credentials namespace

* Fix namespaces
2017-03-02 14:41:06 -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