test: verify automation control center

Cover real folder reconciliation from startup through queue-capacity recovery and reconnect.

Stress the 15,000-job policy, parallel event deduplication, Infinity fallback, restart-persistent pause, the delayed batch gate, and repeated finish behavior without expanding the rendered queue.

Document status, read-only scans, atomic admission, reconciliation, reconnect, pause and current-data processing semantics in English.
This commit is contained in:
Sucukdeluxe
2026-08-26 14:01:10 +02:00
parent 325a20d3fb
commit 362d1dd2cb
4 changed files with 440 additions and 49 deletions
+11 -1
View File
@@ -618,7 +618,13 @@ describe('UploadManager', () => {
'doodstream.com': { retries: 0, parallelCount: 1, maxSpeedKbs: 0, restartBelowKbs: 0, timeIntervalSec: 0, maxSizeMb: 0 }
});
const settled = new Map();
mgr.on('job-settled', event => settled.set(event.jobId, event.status));
const settledEvents = [];
const batchDoneEvents = [];
mgr.on('job-settled', event => {
settled.set(event.jobId, event.status);
settledEvents.push({ jobId: event.jobId, status: event.status });
});
mgr.on('batch-done', event => batchDoneEvents.push(event));
const batch = mgr.startBatch([
{ jobId: 'active', file: '/test/active.mp4', hoster: 'doodstream.com', apiKey: 'key1' },
{ jobId: 'queued', file: '/test/queued.mp4', hoster: 'doodstream.com', apiKey: 'key1' }
@@ -629,6 +635,7 @@ describe('UploadManager', () => {
}
assert.equal(typeof releaseActive, 'function');
mgr.finishAfterActive();
mgr.finishAfterActive();
releaseActive();
await batch;
@@ -636,6 +643,9 @@ describe('UploadManager', () => {
assert.deepEqual(started, ['/test/active.mp4']);
assert.equal(settled.get('active'), 'done');
assert.equal(settled.get('queued'), 'aborted');
assert.equal(settledEvents.filter(event => event.jobId === 'active').length, 1);
assert.equal(settledEvents.filter(event => event.jobId === 'queued').length, 1);
assert.equal(batchDoneEvents.length, 1);
});
it('_combineSignals propagates abort from either source', () => {