Commit Graph

24 Commits

Author SHA1 Message Date
Aditya Bist
bc8aef6a15 fixed sproc failing peek definition (#550)
* fixed sproc failing peek definition

* changed commented out tests for peek definition
2017-11-27 15:08:22 -08:00
Aditya Bist
49f0221dc8 updated smo nuget package with latest bits (#508)
* updated smo nuget package with latest bits

* added new nupkg

* fixed peek definition test

* fixed batch parser wrapper tests
2017-10-19 18:02:47 -07:00
Kevin Cunnane
4b66203dfc Fix tools service crash + improve server edition naming (#506)
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming
- Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service.
  - The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing
  - Added logic to handle null ref issue and other related code
  - Added a unit test for the new error handling path, and supported still returning some value in this case
- Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term.

* Messed up the test - fixing this by returning the expected return object
2017-10-19 10:42:26 -07:00
Aditya Bist
05702182ab Task/script refactor (#476)
* scripting working with race conditions

* new service works with no race conditions

* use new scripting service and commented out tests

* refactored peek definition to use mssql-scripter

* fixed peek definition tests

* removed auto gen comment

* fixed peek definition highlighting bug

* made scripting async and fixed event handlers

* fixed tests (without cancel and plan notifs)

* removed dead code

* added nuget package

* CR comments + select script service implementation

* minor fixes and added test

* CR comments and script select

* added unit tests

* code review comments and cleanup

* fixed failing scripting tests
2017-10-03 14:41:18 -07:00
Aditya Bist
e7756b0bf1 Task/script refactor (#446)
* scripting working with race conditions

* new service works with no race conditions

* use new scripting service and commented out tests

* refactored peek definition to use mssql-scripter

* fixed peek definition tests

* removed auto gen comment

* fixed peek definition highlighting bug

* made scripting async and fixed event handlers

* fixed tests (without cancel and plan notifs)

* removed dead code

* added nuget package

* CR comments + select script service implementation

* minor fixes and added test

* CR comments and script select

* added unit tests

* code review comments and cleanup
2017-10-02 12:02:43 -07:00
Leila Lali
c28a97e6fa Fix/integrationtests (#391)
* fixed the problem with parsing sql2017 version
2017-06-22 09:20:58 -07:00
Karl Burtram
dc3cd9ea59 Create DB work in-progress (#350)
* Stage changes to other machine

* Stage changes

* Update SMO to fix SMO missing Login bug on macOS
2017-05-15 18:48:04 -07:00
Leila Lali
0b39408eae added handler for oe refresh and close session requests (#332)
* added handler for oe refresh and close session requests
2017-05-01 15:20:02 -07:00
Aditya Bist
c4227c2e24 fix peek definition integration tests (#330)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition

* commented out flaky test

* reenabled peek definition tests by removing race condition
2017-04-26 15:50:00 -07:00
Aditya Bist
850cf8c3e4 Bug/fix peek definition integration test (#324)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition

* commented out flaky test
2017-04-19 14:59:58 -07:00
Aditya Bist
6daadcf8cc Bug/fix peek definition integration test (#313)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition
2017-04-13 16:03:44 -07:00
Aditya Bist
1a384d93b4 Bug/fix peek definition integration test (#306)
* removed race condition in peek definition test

* temporarily disabled peek definition tests
2017-04-05 16:03:58 -07:00
Aditya Bist
f9138b27df removed race condition in peek definition test (#305) 2017-04-04 17:57:37 -07:00
Aditya Bist
9e8e1df95e fixed peek definition tokenizing (#281)
* fixed peek definition tokenizing

* fixed signature help test

* added new heuristic for PeekDefinition behaviour

* added tests for new heuristic

* fixed code according to Kevin's CR

* fixed failing test due to shared connection

* changed uri for procedure test
2017-03-23 13:19:59 -07:00
Karl Burtram
addad29b7c Add Scripter class and use it in the ScriptingService (#286)
* Initial scripting commit

* Fix the script CREATE integration test

* Use language service binding queue for scripting

* Update scripting service to have methods for each operation

* Add scripter class

* Fix build break.

* Fix a few bugs

* Use scripter class instead of PeekDefinition class.

* Fix scripting test break

* Fix header incorrectly saying file is generated.

* Add localization tests to address a large block of code not covered by automation.

* Moving system usings to top of using list
2017-03-21 13:18:52 -07: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
Sharon Ravindran
9cc9a76ba8 Fix peek definition test (#242)
* Fix UpdateLanguageService in test

* Use separate language service instance

* Remoce commented code

* Refactor test

* Fix typo
2017-02-17 17:59:27 -08:00
Sharon Ravindran
b10d6bdfdc Check database case sensitivity for peek definition token matching (#227)
* Check database case sensitivity before peek definition token matching

* Add sr gen

* add tests for ignore case

* remove sr.Designer
2017-02-08 12:34:01 -08:00
Sharon Ravindran
50195faced Fix to get the current database context for peek definition (#220)
* Get db name from query connection

* Add comments

* Correct typos

* revert changes to .sln

* Add unit tests

* Fix typo

* Fix error due to a mistyped comment
2017-02-03 17:50:55 -08:00
Leila Lali
41d38b2107 fixed the problem in peekdefinition tests 2017-01-25 17:09:10 -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
Sharon Ravindran
5464e4e63a Feature/peek def code gen (#215)
* Add codeGen for existing types

* Modify code gen logic to match current code

* Extend logic for new smo objects

* Add logic to retrieve token type from QuickInfo

* Remove duplicate types

* Add tests for new types

* Modify GetScript logic to use suggestions first

* Add more tests

* Modify codeGen to include quickInfo logic

* Cake build changes to run CodeGen

* CodeGen replace indentation

* Refactor GetScript and add more tests

* Refactor Resolver calls

* Fix TestDriver test for Definition

* Change quickInfo string case

* Revert change sto .sln file

* Fix typos in comments

* change String to string

* Rename test sql objects
2017-01-19 13:24:58 -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
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