Skip to content

Commit

Permalink
test: Fix a flicker in ExpectedErrorTests (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr authored Mar 21, 2024
1 parent 8a14b9e commit 119bdc1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> { "test exception"})
Expand All @@ -57,9 +57,9 @@ public void Test()

var expectedMetrics = new List<Assertions.ExpectedMetric>
{
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 },

};

Expand Down

0 comments on commit 119bdc1

Please sign in to comment.