* Create ProcessMonitor with test defaults
(
storage: StorageManager,
instanceId: string,
scriptKey: keyof typeof MOCK_SCRIPTS = 'startup',
options: MonitoringOptions = {}
)
| 340 | * Create ProcessMonitor with test defaults |
| 341 | */ |
| 342 | function createTestMonitor( |
| 343 | storage: StorageManager, |
| 344 | instanceId: string, |
| 345 | scriptKey: keyof typeof MOCK_SCRIPTS = 'startup', |
| 346 | options: MonitoringOptions = {} |
| 347 | ): ProcessMonitor { |
| 348 | const processInfo = createTestProcessInfo(instanceId, scriptKey); |
| 349 | return new ProcessMonitor(processInfo, storage, { |
| 350 | autoRestart: false, |
| 351 | maxRestarts: 3, |
| 352 | restartDelay: 100, |
| 353 | healthCheckInterval: 5000, |
| 354 | errorBufferSize: 100, |
| 355 | ...options |
| 356 | }); |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Sleep helper |
no test coverage detected