diff --git a/scripts/prepare-for-tests.mjs b/scripts/prepare-for-tests.mjs index c93ea593..30ac72a0 100644 --- a/scripts/prepare-for-tests.mjs +++ b/scripts/prepare-for-tests.mjs @@ -13,6 +13,8 @@ import path from 'path' import cp from 'child_process' import fetch from 'node-fetch' +console.log(`Preparing for tests...`) + const targetVersions = JSON.parse(await fs.readFile('./tests/ffmpegReleases.json')) const toPosix = (str) => str.split(path.sep).join(path.posix.sep) @@ -33,12 +35,14 @@ async function pathExists(path) { const platformInfo = `${process.platform}-${process.arch}` const platformVersions = targetVersions[platformInfo] +let didDoAnything = false if (platformVersions) { for (const version of platformVersions) { const versionPath = path.join(ffmpegRootDir, version.id) const dirStat = await pathExists(versionPath) if (!dirStat) { + didDoAnything = true console.log(`Fetching ${version.url}`) // Download it @@ -81,3 +85,9 @@ if (platformVersions) { } else { throw new Error(`No FFMpeg binaries have been defined for "${platformInfo}" yet`) } + +if (!didDoAnything) { + console.log(`Nothing to prepare!`) +} else { + console.log(`Preparations done!`) +} diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts index 44ab3126..84b593b8 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts @@ -19,6 +19,7 @@ export async function evaluateExpectationStateFulfilled({ assertState(trackedExp, ExpectedPackageStatusAPI.WorkStatusState.FULFILLED) // TODO: Some monitor that is able to invalidate if it isn't fulfilled anymore? + // We don't want to check too often if it's still fulfilled: if (timeSinceLastEvaluation > tracker.getFulfilledWaitTime()) { await manager.workerAgents.assignWorkerToSession(trackedExp) if (trackedExp.session.assignedWorker) {