diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4d410ca09..08fb886c8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -37,7 +37,7 @@ updates: - "*" allow: - dependency-name: "coverlet.collector" - - dependency-name: "JustMock" # until we upgrade unit tests to target 4.8.1, we can' upgrade to the 20204 JustMock release + - dependency-name: "JustMock" - dependency-name: "Microsoft.NET.Test.Sdk" - dependency-name: "Microsoft.VisualStudio.Azure.Containers.Tools.Targets" - dependency-name: "Microsoft.VisualStudio.Threading.Analyzers" diff --git a/.github/workflows/all_solutions.yml b/.github/workflows/all_solutions.yml index 4e85fffeb..91b5ffcc0 100644 --- a/.github/workflows/all_solutions.yml +++ b/.github/workflows/all_solutions.yml @@ -276,7 +276,7 @@ jobs: env: integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared - integration_tests_path: ${{ github.workspace }}/tests/Agent/IntegrationTests/IntegrationTests/bin/Release/net462 + integration_tests_path: ${{ github.workspace }}/tests/Agent/IntegrationTests/IntegrationTests/bin/Release/net481 # Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources enhanced_logging: false NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1 @@ -327,9 +327,24 @@ jobs: name: integrationtests # Should not need a path because the integration test artifacts are archived with the full directory structure - - name: Install dependencies + - name: Install HostableWebCore Feature + if: | # only install for the required namespaces + matrix.namespace == 'AgentFeatures' || matrix.namespace == 'AgentLogs' || matrix.namespace == 'AgentMetrics' || matrix.namespace == 'BasicInstrumentation' || + matrix.namespace == 'CatInbound' || matrix.namespace == 'CatOutbound' || matrix.namespace == 'CodeLevelMetrics' || matrix.namespace == 'CSP' || + matrix.namespace == 'CustomAttributes' || matrix.namespace == 'CustomInstrumentation' || matrix.namespace == 'DataTransmission' || + matrix.namespace == 'DistributedTracing' || matrix.namespace == 'Errors' || matrix.namespace == 'HttpClientInstrumentation' || + matrix.namespace == 'Rejit.NetFramework' || matrix.namespace == 'RequestHandling' || matrix.namespace == 'RequestHeadersCapture.AspNet' || + matrix.namespace == 'RequestHeadersCapture.AspNetCore' || matrix.namespace == 'RequestHeadersCapture.EnvironmentVariables' || + matrix.namespace == 'RequestHeadersCapture.WCF' || matrix.namespace == 'WCF.Client.IIS.ASPDisabled' || + matrix.namespace == 'WCF.Client.IIS.ASPEnabled' || matrix.namespace == 'WCF.Service.IIS.ASPDisabled' || + matrix.namespace == 'WCF.Service.IIS.ASPEnabled' run: | Enable-WindowsOptionalFeature -Online -FeatureName IIS-HostableWebCore + shell: powershell + + - name: Install aiohttp + if: matrix.namespace == 'DistributedTracing' + run: | pip install aiohttp shell: powershell @@ -406,7 +421,7 @@ jobs: env: integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared - unbounded_tests_path: ${{ github.workspace }}/tests/Agent/IntegrationTests/UnboundedIntegrationTests/bin/Release/net462 + unbounded_tests_path: ${{ github.workspace }}/tests/Agent/IntegrationTests/UnboundedIntegrationTests/bin/Release/net481 NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1 # Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources enhanced_logging: false @@ -443,23 +458,28 @@ jobs: New-ItemProperty -Path $registryPath -Name "Enabled" -Value "0" -PropertyType DWORD -Force shell: powershell - - name: Install dependencies + - name: Install HostableWebCore Feature + if: | # only install for the required namespaces + matrix.namespace == 'Couchbase' || matrix.namespace == 'MongoDB' || matrix.namespace == 'MsSql' || matrix.namespace == 'Oracle' run: | - Write-Host "Installing HostableWebCore Feature" Enable-WindowsOptionalFeature -Online -FeatureName IIS-HostableWebCore - - if ("${{ matrix.namespace }}" -eq "Msmq") { - Write-Host "Installing Msmq Features" - Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Server -All - Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-HTTP -All - Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Triggers -All - } + shell: powershell - if ("${{ matrix.namespace }}" -eq "MsSql") { - Write-Host "Installing MSSQL CLI" - msiexec /i "${{ github.workspace }}\build\Tools\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=YES /quiet /qn /norestart - Start-Sleep 20 # Need to wait for install to finish -- takes only a few seconds, but we need to be sure. - } + - name: Install MSMQ dependencies + if: matrix.namespace == 'Msmq' + run: | + Write-Host "Installing Msmq Features" + Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Server -All + Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-HTTP -All + Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Triggers -All + shell: powershell + + - name: Install MsSql dependencies + if: matrix.namespace == 'MsSql' + run: | + Write-Host "Installing MSSQL CLI" + msiexec /i "${{ github.workspace }}\build\Tools\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=YES /quiet /qn /norestart + Start-Sleep 20 # Need to wait for install to finish -- takes only a few seconds, but we need to be sure. shell: powershell - name: Set up secrets diff --git a/tests/Agent/Benchmarking/Benchmarking/Benchmarking.csproj b/tests/Agent/Benchmarking/Benchmarking/Benchmarking.csproj index b8e9e5b4a..3c0538702 100644 --- a/tests/Agent/Benchmarking/Benchmarking/Benchmarking.csproj +++ b/tests/Agent/Benchmarking/Benchmarking/Benchmarking.csproj @@ -1,6 +1,6 @@ - net462 + net481 Benchmarking Benchmarking diff --git a/tests/Agent/Benchmarking/BenchmarkingTests/BenchmarkingTests.csproj b/tests/Agent/Benchmarking/BenchmarkingTests/BenchmarkingTests.csproj index 16a96d31a..cf78b2923 100644 --- a/tests/Agent/Benchmarking/BenchmarkingTests/BenchmarkingTests.csproj +++ b/tests/Agent/Benchmarking/BenchmarkingTests/BenchmarkingTests.csproj @@ -1,6 +1,6 @@ - net462 + net481 BenchmarkingTests NewRelic.Agent.Core.BenchmarkingTests Full @@ -13,7 +13,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Agent/Benchmarking/ConcurrentBenchmarking/ConcurrentBenchmarking.csproj b/tests/Agent/Benchmarking/ConcurrentBenchmarking/ConcurrentBenchmarking.csproj index 60b497349..32abd50a1 100644 --- a/tests/Agent/Benchmarking/ConcurrentBenchmarking/ConcurrentBenchmarking.csproj +++ b/tests/Agent/Benchmarking/ConcurrentBenchmarking/ConcurrentBenchmarking.csproj @@ -1,6 +1,6 @@ - net462 + net481 ConcurrentBenchmarking ConcurrentBenchmarking diff --git a/tests/Agent/IntegrationTests/IntegrationTests/IntegrationTests.csproj b/tests/Agent/IntegrationTests/IntegrationTests/IntegrationTests.csproj index c56635fb5..00850a046 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/IntegrationTests.csproj +++ b/tests/Agent/IntegrationTests/IntegrationTests/IntegrationTests.csproj @@ -2,9 +2,9 @@ NewRelic.Agent.IntegrationTests NewRelic.Agent.IntegrationTests - net462;net8.0 + net481;net8.0 - + true @@ -55,12 +55,14 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + + + diff --git a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/UnboundedIntegrationTests.csproj b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/UnboundedIntegrationTests.csproj index 844834293..97828d7c2 100644 --- a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/UnboundedIntegrationTests.csproj +++ b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/UnboundedIntegrationTests.csproj @@ -2,7 +2,7 @@ NewRelic.Agent.UnboundedIntegrationTests NewRelic.Agent.UnboundedIntegrationTests - net462 + net481 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages diff --git a/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj b/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj index 1ddfc9a15..1ca4549f2 100644 --- a/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj +++ b/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj @@ -1,6 +1,6 @@ - net462;net8.0 + net481;net8.0 diff --git a/tests/Agent/Shared/TestSerializationHelpers.Test/TestSerializationHelpers.Test.csproj b/tests/Agent/Shared/TestSerializationHelpers.Test/TestSerializationHelpers.Test.csproj index 6e376c013..536d1c116 100644 --- a/tests/Agent/Shared/TestSerializationHelpers.Test/TestSerializationHelpers.Test.csproj +++ b/tests/Agent/Shared/TestSerializationHelpers.Test/TestSerializationHelpers.Test.csproj @@ -1,7 +1,7 @@ - net462;net8.0 + net481;net8.0 NewRelic.Agent.Tests.TestSerializationHelpers.Tests diff --git a/tests/Agent/UnitTests/AsyncLocalTests/AsyncLocalTests.csproj b/tests/Agent/UnitTests/AsyncLocalTests/AsyncLocalTests.csproj index d0ee66872..f81d9fb6a 100644 --- a/tests/Agent/UnitTests/AsyncLocalTests/AsyncLocalTests.csproj +++ b/tests/Agent/UnitTests/AsyncLocalTests/AsyncLocalTests.csproj @@ -1,6 +1,6 @@ - net462 + net481 NewRelic.Providers.CallStack.AsyncLocalTests NewRelic.Providers.CallStack.AsyncLocalTests Full @@ -12,7 +12,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj b/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj index d5dc5e2ea..bc8eeddd6 100644 --- a/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj +++ b/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj @@ -1,6 +1,6 @@ - net462;net8.0 + net481;net8.0 CompositeTests NewRelic.Agent.Core.CompositeTests Full @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -29,7 +29,7 @@ - + diff --git a/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj b/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj index 99c61a513..5d2b51360 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj +++ b/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj @@ -1,6 +1,6 @@ - net462;net8.0 + net481;net8.0 NewRelic.Agent.Core NewRelic.Agent.Core.UnitTest Full @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -28,12 +28,13 @@ - + + @@ -46,7 +47,7 @@ - + diff --git a/tests/Agent/UnitTests/Core.UnitTest/DataTransport/ConnectionManagerTests.cs b/tests/Agent/UnitTests/Core.UnitTest/DataTransport/ConnectionManagerTests.cs index f4415eae4..289e6028d 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/DataTransport/ConnectionManagerTests.cs +++ b/tests/Agent/UnitTests/Core.UnitTest/DataTransport/ConnectionManagerTests.cs @@ -81,7 +81,6 @@ public void AttemptAutoStart_SchedulesConnectAsynchronously_IfAutoStartIsOnAndSy } } - [Test] [TestCase("ForceRestartException")] [TestCase("HttpException")] diff --git a/tests/Agent/UnitTests/NewRelic.Agent.Extensions.Tests/NewRelic.Agent.Extensions.Tests.csproj b/tests/Agent/UnitTests/NewRelic.Agent.Extensions.Tests/NewRelic.Agent.Extensions.Tests.csproj index fcfc5291e..3d0255647 100644 --- a/tests/Agent/UnitTests/NewRelic.Agent.Extensions.Tests/NewRelic.Agent.Extensions.Tests.csproj +++ b/tests/Agent/UnitTests/NewRelic.Agent.Extensions.Tests/NewRelic.Agent.Extensions.Tests.csproj @@ -1,6 +1,6 @@ - net462;net8.0 + net481;net8.0 Agent.Extensions.Tests NewRelic.Agent.Extensions.Tests Full @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -25,7 +25,7 @@ - + diff --git a/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj b/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj index 01a1764db..0b4fbc431 100644 --- a/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj +++ b/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj @@ -1,6 +1,6 @@ - net462;net8.0 + net481;net8.0 NewRelic.Agent.TestUtilities NewRelic.Agent.TestUtilities @@ -21,7 +21,7 @@ - + diff --git a/tests/Agent/UnitTests/NewRelic.Testing.Assertions.UnitTests/NewRelic.Testing.Assertions.UnitTests.csproj b/tests/Agent/UnitTests/NewRelic.Testing.Assertions.UnitTests/NewRelic.Testing.Assertions.UnitTests.csproj index 4cdaa4afb..f1c48888c 100644 --- a/tests/Agent/UnitTests/NewRelic.Testing.Assertions.UnitTests/NewRelic.Testing.Assertions.UnitTests.csproj +++ b/tests/Agent/UnitTests/NewRelic.Testing.Assertions.UnitTests/NewRelic.Testing.Assertions.UnitTests.csproj @@ -2,7 +2,7 @@ x86 {A6AE0190-AEAB-4B3A-B671-95C2D5123BF9} - net462 + net481 {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} NewRelic.Testing.Assertions.UnitTests NewRelic.Testing.Assertions.UnitTests diff --git a/tests/Agent/UnitTests/PublicApiChangeTests/PublicApiChangeTests.csproj b/tests/Agent/UnitTests/PublicApiChangeTests/PublicApiChangeTests.csproj index 5fafcac76..f92e905c9 100644 --- a/tests/Agent/UnitTests/PublicApiChangeTests/PublicApiChangeTests.csproj +++ b/tests/Agent/UnitTests/PublicApiChangeTests/PublicApiChangeTests.csproj @@ -16,7 +16,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - +