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

Coverage is 0 all the time #22

Open
petrce opened this issue Sep 29, 2020 · 3 comments
Open

Coverage is 0 all the time #22

petrce opened this issue Sep 29, 2020 · 3 comments

Comments

@petrce
Copy link

petrce commented Sep 29, 2020

Hi, whatever I do coverage stays 0 at Azure SQL any idea how I can debug it?
outside of that task runs flawlessly :)

@petrce
Copy link
Author

petrce commented Sep 29, 2020

probably connected with: GoEddie/SQLCover#51

@Gwayaboy
Copy link

@petrce I've got the same issue (or similar) and looking the at Azure DevOps Service Windows Microsoft hosted agent's logs it has to do with creating the extended events trace and suspect it also related to the issue you mentioned

GoEddie/SQLCover#51

I am not sure if it is also because I am using SQL Server 2019 within A VM in azure (but in my sense, it should not make a difference as allow SQL port are open from any client IP connection). See error log and stack trace below

running the tSQLt tests and getting Code Coverage...
Database set to tSQLt_Example
Error starting trace: System.InvalidOperationException: Error creating the extended events trace, error: This operation is not supported in this version of SQL Server. ---> System.Data.SqlClient.SqlException: This operation is not supported in this version of SQL Server.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at SQLCover.Gateway.DatabaseGateway.Execute(String command, Int32 timeOut) in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\Gateway\DatabaseGateway.cs:line 116
at SQLCover.Trace.TraceController.RunScript(String query, String error, Int32 timeout) in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\Trace\TraceController.cs:line 33
--- End of inner exception stack trace ---
at SQLCover.Trace.TraceController.RunScript(String query, String error, Int32 timeout) in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\Trace\TraceController.cs:line 37
at SQLCover.Trace.AzureTraceController.Create() in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\Trace\AzureTraceController.cs:line 57
at SQLCover.Trace.AzureTraceController.Start() in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\Trace\AzureTraceController.cs:line 62
at SQLCover.CodeCoverage.Start() in C:\repos\OSS\SQLCover-riserrad\src\SQLCover\SQLCover\CodeCoverage.cs:line 71
##[error]Microsoft.PowerShell.Commands.WriteErrorException: Error while starting the Unit Test with Code Coverage session.
##[error]PowerShell script completed with 1 errors.

@dhanneudesic
Copy link

I also got same error that of @Gwayaboy . I am running Microsoft SQL Server Enterprise (64-bit) version 13.0.5103.6 .

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

No branches or pull requests

3 participants