From 083fca3f02704c68a92ae20354c45e9f931c2c82 Mon Sep 17 00:00:00 2001 From: Gregory LEOCADIE Date: Wed, 22 May 2024 16:27:59 +0200 Subject: [PATCH 1/4] Bump FluentAssertions to 6.12.0 --- .../Datadog.Profiler.IntegrationTests.csproj | 2 +- .../Exceptions/ExceptionsTest.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler/test/Datadog.Profiler.IntegrationTests/Datadog.Profiler.IntegrationTests.csproj b/profiler/test/Datadog.Profiler.IntegrationTests/Datadog.Profiler.IntegrationTests.csproj index fc30086879b7..6edc1031e20d 100644 --- a/profiler/test/Datadog.Profiler.IntegrationTests/Datadog.Profiler.IntegrationTests.csproj +++ b/profiler/test/Datadog.Profiler.IntegrationTests/Datadog.Profiler.IntegrationTests.csproj @@ -37,7 +37,7 @@ - + diff --git a/profiler/test/Datadog.Profiler.IntegrationTests/Exceptions/ExceptionsTest.cs b/profiler/test/Datadog.Profiler.IntegrationTests/Exceptions/ExceptionsTest.cs index 7fc590aa577b..0c2bc523e092 100644 --- a/profiler/test/Datadog.Profiler.IntegrationTests/Exceptions/ExceptionsTest.cs +++ b/profiler/test/Datadog.Profiler.IntegrationTests/Exceptions/ExceptionsTest.cs @@ -123,11 +123,11 @@ public void Sampling(string appName, string framework, string appAssembly) // The profiler samples the exception but also upscale the values after. // So we just check that we are in the right order of magnitude. // Note: with timestamps, upscaling will round down due to the lack of aggregation - exceptionCounts.Should().ContainKey("System.Exception").WhichValue.Should().BeCloseTo(4000, 300); + exceptionCounts.Should().ContainKey("System.Exception").WhoseValue.Should().BeCloseTo(4000, 300); // System.InvalidOperationException is seen only once, so it should be sampled // despite the sampler being saturated by the 4000 System.Exception - exceptionCounts.Should().ContainKey("System.InvalidOperationException").WhichValue.Should().Be(1); + exceptionCounts.Should().ContainKey("System.InvalidOperationException").WhoseValue.Should().Be(1); } [TestAppFact("Samples.ExceptionGenerator")] From c6823f92e573ec74c8f158fe5bd16b86f797aaf1 Mon Sep 17 00:00:00 2001 From: Gregory LEOCADIE Date: Wed, 22 May 2024 17:48:51 +0200 Subject: [PATCH 2/4] Fix tests --- .../DebugInfo/LineNumberTest.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs b/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs index af513fb7ae53..8a7dcf776011 100644 --- a/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs +++ b/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs @@ -70,18 +70,18 @@ public void CheckLinenumbers(string appName, string framework, string appAssembl // forced line info first.Filename.Should().EndWith("LineNumber.cs"); - first.StartLine.Should().Equals(103); - first.Line.Should().Equals(103); + first.StartLine.Should().Be(103); + first.Line.Should().Be(103); // "normal" line info second.Filename.Should().EndWith("LineNumber.cs"); - second.StartLine.Should().Equals(42); - second.Line.Should().Equals(42); + second.StartLine.Should().Be(42); + second.Line.Should().Be(42); // hidden debug info third.Filename.Should().BeEmpty(); - third.StartLine.Should().Equals(0); - third.Line.Should().Equals(0); + third.StartLine.Should().Be(0); + third.Line.Should().Be(0); } } @@ -103,7 +103,7 @@ public void CheckNoLinenumbersIfDisabled(string appName, string framework, strin for (var i = 0; i < stackTrace.FramesCount; i++) { stackTrace[i].Filename.Should().BeEmpty(); - stackTrace[i].StartLine.Should().Equals(0); + stackTrace[i].StartLine.Should().Be(0); } } } @@ -126,7 +126,7 @@ public void CheckLineNumberAreDisabledByDefault(string appName, string framework for (var i = 0; i < stackTrace.FramesCount; i++) { stackTrace[i].Filename.Should().BeEmpty(); - stackTrace[i].StartLine.Should().Equals(0); + stackTrace[i].StartLine.Should().Be(0); } } } From 4ee9e1b84ebd80e10496454afcfe42279d2fc75c Mon Sep 17 00:00:00 2001 From: Gregory LEOCADIE Date: Wed, 22 May 2024 18:04:59 +0200 Subject: [PATCH 3/4] Bump for tracer too --- tracer/test/Directory.Build.props | 2 +- .../Samples.InstrumentedTests.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tracer/test/Directory.Build.props b/tracer/test/Directory.Build.props index 54bbb53789ed..359bf5be25ba 100644 --- a/tracer/test/Directory.Build.props +++ b/tracer/test/Directory.Build.props @@ -18,7 +18,7 @@ - + diff --git a/tracer/test/test-applications/integrations/Samples.InstrumentedTests/Samples.InstrumentedTests.csproj b/tracer/test/test-applications/integrations/Samples.InstrumentedTests/Samples.InstrumentedTests.csproj index 6b209edbab46..a5e47f7ea5ee 100644 --- a/tracer/test/test-applications/integrations/Samples.InstrumentedTests/Samples.InstrumentedTests.csproj +++ b/tracer/test/test-applications/integrations/Samples.InstrumentedTests/Samples.InstrumentedTests.csproj @@ -26,7 +26,7 @@ - + @@ -108,4 +108,4 @@ - \ No newline at end of file + From 07a874f480054fc724846543e0bb6e4d6d16c4b4 Mon Sep 17 00:00:00 2001 From: Gregory LEOCADIE Date: Wed, 22 May 2024 19:37:32 +0200 Subject: [PATCH 4/4] Fix tests --- .../DebugInfo/LineNumberTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs b/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs index 8a7dcf776011..0acd4b9aeb7f 100644 --- a/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs +++ b/profiler/test/Datadog.Profiler.IntegrationTests/DebugInfo/LineNumberTest.cs @@ -75,8 +75,8 @@ public void CheckLinenumbers(string appName, string framework, string appAssembl // "normal" line info second.Filename.Should().EndWith("LineNumber.cs"); - second.StartLine.Should().Be(42); - second.Line.Should().Be(42); + second.StartLine.Should().Be(41); + second.Line.Should().Be(41); // hidden debug info third.Filename.Should().BeEmpty();