Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Tracing error with SQLLocalDB datasource based on Windows named pipe line #67

Closed
epsilony opened this issue Dec 30, 2020 · 2 comments · Fixed by #68
Closed

Default Tracing error with SQLLocalDB datasource based on Windows named pipe line #67

epsilony opened this issue Dec 30, 2020 · 2 comments · Fixed by #68

Comments

@epsilony
Copy link
Contributor

Describe the bug
When datasource is some thing like: np:\\.\pipe\LOCALDB#8216D766\tsql\query, and if Default

To Reproduce
Steps to reproduce the behavior:

  1. Create a tSql test based on LocalDB
  2. Pass the named pipeline url to the Coverage construction with default trace settings:
    var cc = new CodeCoverage("np:\\\\.\\pipe\\LOCALDB#8216D766\\tsql\\query", connectionString, "master", null, true);
  3. do any coverage testing:
    _codeCoverage.Cover($"exec tSQLt.Run '{_testFullName}'");
  4. See error
    SQLCover.SqlCoverException : Unable to start the trace - errors are recorded in the debug output
    Error starting trace: System.Data.SqlClient.SqlException (0x80131904): Failed to open loopback connection. ...
    Expected behavior

No exceptions

Desktop (please complete the following information):

  • OS: Windows 10
  • DB: SQLocalDB 2017

===
Please at me @GoEddie so I receive a notification

@GoEddie
Copy link
Owner

GoEddie commented Dec 30, 2020

Do you still get a crash if you use the localdb type connection string "(localdb)\instanceName" rather than the named pipe connection string?

epsilony pushed a commit to epsilony/SQLCover that referenced this issue Dec 30, 2020
* for issue GoEddie#67
* determine localdb when the datasource url starts with:
  'np:\\.\pipe\LOCALDB'
@epsilony
Copy link
Contributor Author

(localdb) connection works fine.

And ... just tried to create a PR for this: #68 , just manually tested.

GoEddie pushed a commit that referenced this issue Dec 30, 2020
* for issue #67
* determine localdb when the datasource url starts with:
  'np:\\.\pipe\LOCALDB'

Co-authored-by: Mann Yuan (袁满) <Mann.Yuan@citrix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants