GoEddie / SQLCover

Apache License 2.0
63 stars 52 forks source link

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

Closed epsilony closed 3 years ago

epsilony commented 3 years ago

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):

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

GoEddie commented 3 years ago

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

epsilony commented 3 years ago

(localdb) connection works fine.

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