mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-21 06:02:13 +00:00
fix(test-planner): shrink local extension batches on constrained hosts
This commit is contained in:
@@ -50,6 +50,38 @@ describe("test planner", () => {
|
||||
artifacts.cleanupTempArtifacts();
|
||||
});
|
||||
|
||||
it("uses smaller shared extension batches on constrained local hosts", () => {
|
||||
const env = {
|
||||
RUNNER_OS: "macOS",
|
||||
OPENCLAW_TEST_HOST_CPU_COUNT: "8",
|
||||
OPENCLAW_TEST_HOST_MEMORY_GIB: "16",
|
||||
OPENCLAW_TEST_LOAD_AWARE: "0",
|
||||
};
|
||||
const artifacts = createExecutionArtifacts(env);
|
||||
const plan = buildExecutionPlan(
|
||||
{
|
||||
profile: null,
|
||||
mode: "local",
|
||||
surfaces: ["extensions"],
|
||||
passthroughArgs: [],
|
||||
},
|
||||
{
|
||||
env,
|
||||
platform: "darwin",
|
||||
writeTempJsonArtifact: artifacts.writeTempJsonArtifact,
|
||||
},
|
||||
);
|
||||
|
||||
const sharedExtensionBatches = plan.selectedUnits.filter((unit) =>
|
||||
unit.id.startsWith("extensions-batch-"),
|
||||
);
|
||||
|
||||
expect(plan.runtimeCapabilities.memoryBand).toBe("constrained");
|
||||
expect(plan.executionBudget.extensionsBatchTargetMs).toBe(60_000);
|
||||
expect(sharedExtensionBatches.length).toBeGreaterThan(3);
|
||||
artifacts.cleanupTempArtifacts();
|
||||
});
|
||||
|
||||
it("scales down mid-tier local concurrency under saturated load", () => {
|
||||
const artifacts = createExecutionArtifacts({
|
||||
RUNNER_OS: "Linux",
|
||||
|
||||
Reference in New Issue
Block a user