Skip to content

Commit 9f72802

Browse files
committed
Reduce grain counts in ManualCollectionShouldNotCollectBusyActivations to 20 each
CI environments have more limited thread pool capacity than local machines. Even 100 blocked grains exhausts the thread pool, causing ForceActivationCollection to timeout. Reducing to 20 grains is sufficient to test the functionality while avoiding thread pool starvation.
1 parent 7a3604c commit 9f72802

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,4 @@ src/SetupTestScriptOutput.txt
220220

221221
# code coverage
222222
*.cobertura.xml
223+
OrleansTestSecrets.json

test/TesterInternal/ActivationsLifeCycleTests/ActivationCollectorTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,15 @@ public async Task ManualCollectionShouldNotCollectBusyActivations()
274274
// 2. Busy activations remain not-inactive (IsCurrentlyExecuting = true) regardless of time
275275
// 3. The collector only collects activations that are both inactive AND stale
276276
//
277-
// NOTE: We use smaller grain counts (100 each) compared to the automatic collection test (500 each)
277+
// NOTE: We use much smaller grain counts (20 each) compared to the automatic collection test (500 each)
278278
// because we need to call ForceActivationCollection while grains are blocked. Blocking too many grains
279279
// exhausts the silo thread pool and causes the management grain call to timeout.
280+
// CI environments have limited thread pool capacity, so we keep the count very low.
280281
await Initialize(DEFAULT_IDLE_TIMEOUT, useFakeTimeProvider: true);
281282

282283
TimeSpan shortIdleTimeout = TimeSpan.FromSeconds(1);
283-
const int idleGrainCount = 100;
284-
const int busyGrainCount = 100;
284+
const int idleGrainCount = 20;
285+
const int busyGrainCount = 20;
285286
var idleGrainTypeName = RuntimeTypeNameFormatter.Format(typeof(IdleActivationGcTestGrain1));
286287
var busyGrainTypeName = RuntimeTypeNameFormatter.Format(typeof(BusyActivationGcTestGrain1));
287288

0 commit comments

Comments
 (0)