test: fix provider runtime mocks and test planner load shedding

This commit is contained in:
Ayaan Zaidi
2026-03-31 11:02:33 +05:30
parent aebdb8f8cf
commit 3059eadca2
4 changed files with 70 additions and 32 deletions

View File

@@ -150,12 +150,12 @@ describe("test planner", () => {
expect(plan.executionBudget.unitIsolatedWorkers).toBe(1);
expect(plan.executionBudget.topLevelParallelLimitNoIsolate).toBe(4);
expect(plan.executionBudget.topLevelParallelLimitIsolated).toBe(1);
expect(plan.topLevelParallelLimit).toBe(3);
expect(plan.topLevelParallelLimit).toBe(4);
expect(plan.deferredRunConcurrency).toBe(1);
artifacts.cleanupTempArtifacts();
});
it("coalesces saturated high-memory local unit bursts into fewer shared batches", () => {
it("splits saturated high-memory local unit bursts into smaller shared batches", () => {
const env = {
RUNNER_OS: "macOS",
OPENCLAW_TEST_HOST_CPU_COUNT: "16",
@@ -200,9 +200,9 @@ describe("test planner", () => {
expect(plan.runtimeCapabilities.memoryBand).toBe("high");
expect(plan.runtimeCapabilities.loadBand).toBe("saturated");
expect(sharedUnitBatches.length).toBeLessThan(baselineSharedUnitBatches.length);
expect(sharedUnitBatches.length).toBeGreaterThan(baselineSharedUnitBatches.length);
expect(plan.executionBudget.unitIsolatedWorkers).toBe(1);
expect(plan.executionBudget.unitFastBatchTargetMs).toBe(90_000);
expect(plan.executionBudget.unitFastBatchTargetMs).toBe(22_500);
artifacts.cleanupTempArtifacts();
});