mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 02:00:52 +01:00
test(plugins): isolate comment wake scheduling
Allow plugin host tests to inject a heartbeat runtime environment so worktree scheduling suppression cannot replace the wake the test is verifying. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
38012cdf94
commit
6a1ebf63a4
2 files changed
+14
-2
No files matched your search
@@ -862,7 +862,14 @@ describeEmbeddedPostgres("plugin orchestration APIs", () => {
|
||||
contextSnapshot: {},
|
||||
});
|
||||
|
||||
const services = buildHostServices(db, "plugin-record-id", "paperclip.gateway", createEventBusStub());
|
||||
const services = buildHostServices(
|
||||
db,
|
||||
"plugin-record-id",
|
||||
"paperclip.gateway",
|
||||
createEventBusStub(),
|
||||
undefined,
|
||||
{ heartbeatRuntimeEnv: {} },
|
||||
);
|
||||
const comment = await services.issues.createComment({
|
||||
issueId,
|
||||
companyId,
|
||||
|
||||
@@ -690,7 +690,11 @@ export function buildHostServices(
|
||||
pluginKey: string,
|
||||
eventBus: PluginEventBus,
|
||||
notifyWorker?: (method: string, params: unknown) => void,
|
||||
options: { pluginWorkerManager?: PluginWorkerManager; manifest?: import("@paperclipai/shared").PaperclipPluginManifestV1 } = {},
|
||||
options: {
|
||||
pluginWorkerManager?: PluginWorkerManager;
|
||||
manifest?: import("@paperclipai/shared").PaperclipPluginManifestV1;
|
||||
heartbeatRuntimeEnv?: Record<string, string | undefined>;
|
||||
} = {},
|
||||
): HostServices & { dispose(): void } {
|
||||
const registry = pluginRegistryService(db);
|
||||
const stateStore = pluginStateStore(db);
|
||||
@@ -730,6 +734,7 @@ export function buildHostServices(
|
||||
});
|
||||
const heartbeat = heartbeatService(db, {
|
||||
pluginWorkerManager: options.pluginWorkerManager,
|
||||
runtimeEnv: options.heartbeatRuntimeEnv,
|
||||
});
|
||||
const projects = projectService(db);
|
||||
const executionWorkspaces = executionWorkspaceService(db);
|
||||
|
||||
Reference in new issue
Block a user