From 119bdc170cf51832c57b230590aa6e6b60a4d754 Mon Sep 17 00:00:00 2001 From: Marty T <120425148+tippmar-nr@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:38:43 -0500 Subject: [PATCH] test: Fix a flicker in ExpectedErrorTests (#2358) --- .../IntegrationTests/Errors/ExpectedErrorTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Errors/ExpectedErrorTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Errors/ExpectedErrorTests.cs index d68cedf16..6314cab23 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Errors/ExpectedErrorTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Errors/ExpectedErrorTests.cs @@ -31,7 +31,7 @@ public ExpectedErrorTests(RemoteServiceFixtures.AspNetCoreMvcBasicRequestsFixtur var configModifier = new NewRelicConfigModifier(configPath); configModifier.ConfigureFasterMetricsHarvestCycle(10); configModifier.ConfigureFasterSpanEventsHarvestCycle(10); - configModifier.ConfigureFasterErrorTracesHarvestCycle(12); // long enough to ensure metric harvest runs before error traces + configModifier.ConfigureFasterErrorTracesHarvestCycle(15); // long enough to ensure metric harvest runs before error traces configModifier.SetOrDeleteDistributedTraceEnabled(true); configModifier.AddExpectedStatusCodes("410-450") .AddExpectedErrorMessages("System.Exception", new List { "test exception"}) @@ -57,9 +57,9 @@ public void Test() var expectedMetrics = new List { - new Assertions.ExpectedMetric {metricName = @"ErrorsExpected/all", callCount = 3}, - new Assertions.ExpectedMetric { metricName = @"Supportability/Events/TransactionError/Seen", callCount = 3 }, - new Assertions.ExpectedMetric { metricName = @"Supportability/Events/TransactionError/Sent", callCount = 3 }, + new Assertions.ExpectedMetric {metricName = @"ErrorsExpected/all", CallCountAllHarvests = 3}, + new Assertions.ExpectedMetric { metricName = @"Supportability/Events/TransactionError/Seen", CallCountAllHarvests= 3 }, + new Assertions.ExpectedMetric { metricName = @"Supportability/Events/TransactionError/Sent", CallCountAllHarvests = 3 }, };