Skip to content

Commit eea30d9

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/masstransit-multi-transport-queue-parsing
2 parents 4d84837 + 0e78da3 commit eea30d9

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/PerformanceMetrics.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ public static void Test(int countMaxWorkerThreads, int countMaxCompletionThreads
1919

2020
ThreadPool.SetMaxThreads(countMaxWorkerThreads, countMaxCompletionThreads);
2121

22+
// Induce Gen0-only collections BEFORE the agent starts. GCSamplerV2 reads
23+
// cumulative GC.CollectionCount() values, so these pre-agent collections
24+
// guarantee that CollectionCount(0) > CollectionCount(1) by the time the
25+
// first sample runs — regardless of when the sampler fires relative to
26+
// StartAgent(). V1 (EventListener-based) is unaffected since it only
27+
// captures events after the listener registers inside StartAgent().
28+
GC.Collect(0);
29+
GC.Collect(0);
30+
2231
StartAgent();
2332
}
2433

tests/Agent/IntegrationTests/UnboundedIntegrationTests/CosmosDB/CosmosDBTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected CosmosDBTestsBase(TFixture fixture, ITestOutputHelper output) : base(f
5757
exerciseApplication: () =>
5858
{
5959
_fixture.AgentLog.WaitForLogLine(AgentLogBase.AgentConnectedLogLineRegex, TimeSpan.FromMinutes(1));
60-
_fixture.AgentLog.WaitForLogLine(AgentLogBase.MetricDataLogLineRegex, TimeSpan.FromMinutes(1));
60+
_fixture.AgentLog.WaitForLogLines(AgentLogBase.MetricDataLogLineRegex, TimeSpan.FromMinutes(2), 2);
6161
_fixture.AgentLog.WaitForLogLine(AgentLogBase.SqlTraceDataLogLineRegex, TimeSpan.FromMinutes(1));
6262
}
6363
);

0 commit comments

Comments
 (0)