You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== Failed
=== FAIL: . TestQueryIODBWithoutInstanceName (0.02s)
queries_test.go:20:
Error Trace: D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/sqlserverreceiver/queries_test.go:20
Error: Not equal:
expected: "\r\nSET DEADLOCK_PRIORITY -10;\r\nIF SERVERPROPERTY('EngineEdition') NOT IN (2,3,4) BEGIN /*NOT IN Standard,Enterprise,Express*/\r\n\tDECLARE @ErrorMessage AS nvarchar(500) = 'Connection string Server:'+ @@ServerName + ',Database:' + DB_NAME() +' is not a SQL Server Standard,Enterprise or Express. This query is only supported on these editions.';\r\n\tRAISERROR (@ErrorMessage,11,1)\r\n\tRETURN\r\nEND\r\n\r\nDECLARE\r\n\t @SqlStatement AS nvarchar(max)\r\n\t,@MajorMinorVersion AS int = CAST(PARSENAME(CAST(SERVERPROPERTY('ProductVersion') AS nvarchar),4) AS int) * 100 + CAST(PARSENAME(CAST(SERVERPROPERTY('ProductVersion') AS nvarchar),3) AS int)\r\n\t,@Columns AS nvarchar(max) = ''\r\n\t,@Tables AS nvarchar(max) = ''\r\nIF @MajorMinorVersion > 1100 BEGIN\r\n\tSET @Columns += N'\r\n\t,vfs.[io_stall_queued_read_ms] AS [rg_read_stall_ms]\r\n\t,vfs.[io_stall_queued_write_ms] AS [rg_write_stall_ms]'\r\nEND\r\n\r\nSET @SqlStatement = N'\r\nSELECT\r\n\t''sqlserver_database_io'' AS [measurement]\r\n\t,REPLACE(@@SERVERNAME,''\\'','':'') AS [sql_instance]\r\n\t,HOST_NAME() AS [computer_name]\r\n\t,DB_NAME(vfs.[database_id]) AS [database_name]\r\n\t,COALESCE(mf.[physical_name],''RBPEX'') AS [physical_filename]\t--RPBEX = Resilient Buffer Pool Extension\r\n\t,COALESCE(mf.[name],''RBPEX'') AS [logical_filename]\t--RPBEX = Resilient Buffer Pool Extension\r\n\t,mf.[type_desc] AS [file_type]\r\n\t,vfs.[io_stall_read_ms] AS [read_latency_ms]\r\n\t,vfs.[num_of_reads] AS [reads]\r\n\t,vfs.[num_of_bytes_read] AS [read_bytes]\r\n\t,vfs.[io_stall_write_ms] AS [write_latency_ms]\r\n\t,vfs.[num_of_writes] AS [writes]\r\n\t,vfs.[num_of_bytes_written] AS [write_bytes]'\r\n\t+ @Columns + N'\r\nFROM sys.dm_io_virtual_file_stats(NULL, NULL) AS vfs\r\nINNER JOIN sys.master_files AS mf WITH (NOLOCK)\r\n\tON vfs.[database_id] = mf.[database_id] AND vfs.[file_id] = mf.[file_id]\r\n'\r\n+ @Tables;\r\n\r\nEXEC sp_executesql @SqlStatement\r\n"
actual : "\nSET DEADLOCK_PRIORITY -10;\nIF SERVERPROPERTY('EngineEdition') NOT IN (2,3,4) BEGIN /*NOT IN Standard,Enterprise,Express*/\n\tDECLARE @ErrorMessage AS nvarchar(500) = 'Connection string Server:'+ @@ServerName + ',Database:' + DB_NAME() +' is not a SQL Server Standard,Enterprise or Express. This query is only supported on these editions.';\n\tRAISERROR (@ErrorMessage,11,1)\n\tRETURN\nEND\n\nDECLARE\n\t @SqlStatement AS nvarchar(max)\n\t,@MajorMinorVersion AS int = CAST(PARSENAME(CAST(SERVERPROPERTY('ProductVersion') AS nvarchar),4) AS int) * 100 + CAST(PARSENAME(CAST(SERVERPROPERTY('ProductVersion') AS nvarchar),3) AS int)\n\t,@Columns AS nvarchar(max) = ''\n\t,@Tables AS nvarchar(max) = ''\nIF @MajorMinorVersion > 1100 BEGIN\n\tSET @Columns += N'\n\t,vfs.[io_stall_queued_read_ms] AS [rg_read_stall_ms]\n\t,vfs.[io_stall_queued_write_ms] AS [rg_write_stall_ms]'\nEND\n\nSET @SqlStatement = N'\nSELECT\n\t''sqlserver_database_io'' AS [measurement]\n\t,REPLACE(@@SERVERNAME,''\\'','':'') AS [sql_instance]\n\t,HOST_NAME() AS [computer_name]\n\t,DB_NAME(vfs.[database_id]) AS [database_name]\n\t,COALESCE(mf.[physical_name],''RBPEX'') AS [physical_filename]\t--RPBEX = Resilient Buffer Pool Extension\n\t,COALESCE(mf.[name],''RBPEX'') AS [logical_filename]\t--RPBEX = Resilient Buffer Pool Extension\n\t,mf.[type_desc] AS [file_type]\n\t,vfs.[io_stall_read_ms] AS [read_latency_ms]\n\t,vfs.[num_of_reads] AS [reads]\n\t,vfs.[num_of_bytes_read] AS [read_bytes]\n\t,vfs.[io_stall_write_ms] AS [write_latency_ms]\n\t,vfs.[num_of_writes] AS [writes]\n\t,vfs.[num_of_bytes_written] AS [write_bytes]'\n\t+ @Columns + N'\nFROM sys.dm_io_virtual_file_stats(NULL, NULL) AS vfs\nINNER JOIN sys.master_files AS mf WITH (NOLOCK)\n\tON vfs.[database_id] = mf.[database_id] AND vfs.[file_id] = mf.[file_id]\n'\n+ @Tables;\n\nEXEC sp_executesql @SqlStatement\n"
This is happening because of the way Windows handles new lines.
The text was updated successfully, but these errors were encountered:
)
Tests were failing on Windows because when the expected results were
loaded from a file, the newlines were `\r\n` instead of `\n`. This
replaces the unexpected characters for testing.
This is a test only change, and re-enables the tests that were being
skipped.
Resolves#32519
Component(s)
receiver/sqlserver
Describe the issue you're reporting
Failing CI/CD link
Example failure:
This is happening because of the way Windows handles new lines.
The text was updated successfully, but these errors were encountered: