- Add telemetry point for format requests
- Update PeekDefinition telemetry so that it captures whether the attempt succeeded and if it was connected. This will help us understand whether our current behavior of just notifying success/failure to the output window was useful or not. It will also help us understand whether we're doing a good job implementing this / if we need to improve reliability and preformance.
* Stage changes to other machine
* IntelliSense cache rebuild command
* Move to other machine
* Add a test for overwriting binding queue.
* Move event handler into lanaguageservice.cs
- TSqlFormatterService with support for formatting document and text range inside document
- Settings support for all formatting options.
- Extensibility support so that the service can be initialized using MEF extensibility, and can find all necessary TSqlFormatters using the same process
Fix Initialize request error on startup
- Messages were being read from the input channel before all request handlers were registered
- In particular, the Initialize request which is key for any server to talk to the client was getting lost because the message reader thread begins consuming, and we take an extra few hundred milliseconds due to MEF startup before we register the handler
- The solution is to initialize the message handler so request handlers can register, but not actually start processing incoming messages until all handers are ready. This is a safer way to go and should improve reliability overall
Improvements from internal prototype:
- Normalizing baselines to handle the line ending differences on Mac & Linux vs. Windows
- Significantly shortened most lines by implementing base class methods to wrap common objects from Visitor.Context and removing unnecessary "this." syntax
- Refactored the SqlCommonTableExpressionFormatter and related classes to reduce code count significantly. This provides a pattern to follow when refactoring other classes for similar clarity. It's likely a lot of common logic could be found and reused across these.
- Reduced overall code size by adding utility methods
* 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
* 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
* 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
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
* DbColumn and ReliableConnection tests
* More retry connection tests
* More tests
* Fix broken peek definition integration tests
* Fix test bug
* Add a couple batch tests
* Add some more tests
* More tests for code coverage.
* Validation and Diagnostic tests
* A few more tests
* A few mote test changes.
* Update file path tests to run on Windows only
* Fix Integrated auth error and Uri for *nix/Mac
* Format code
* Add Logging and unit tests
* Modify tests for Windows:
* Workaround missing default schema on *nix and Mac
* Add unit tests
* Correct comments
* Change loop length
* Fix Log message
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
Next round of code coverage test cases. Please review the commit for next iteration.
* Add connection retry tests
* More test coverage
* Update diagnostics end-to-end test
* Remove extra layer of tasks in binding queue
* Change order of assigning result to avoid race condition
* Add timeout log for the metadata lock event
* Fix test cases
* Implemented connection cancellation
* Made connect requests return immediately and created a separate connection complete notification
* Fix spelling
* Fix sorting
* Add separate lock for cancellation source map
* Initial code for binding queue
* Fix-up some of the timeout wait code
* Add some initial test code
* Add missing test file
* Update the binding queue tests
* Add more test coverage and refactor a bit. Disable reliabile connection until we can fix it..it's holding an open data reader connection.
* A few more test updates
* Initial integrate queue with language service.
* Hook up the connected binding queue into al binding calls.
* Cleanup comments and remove dead code
* More missing comments
* Fix build break. Reenable ReliabileConnection.
* Revert all changes to SqlConnectionFactory
* Resolve merge conflicts
* Cleanup some more of the timeouts and sync code
* Address code review feedback
* Address more code review feedback
* Enable IntelliSense settings
* Fix up some bugs in the IntelliSense settings.
* Code cleans for PR
* Fix a couple exceptions that are breaks query execute and intellisense.
* Add useLowerCase flag and settings tests