E4: dimostrazione e passi delle schermate che reggono a ogni ora

Quale video sia fermo dipende dall'ora: i passi lo cercano in tutta la libreria e dicono se manca. La dimostrazione
chiude la ricerca prima dell'archivio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 18:57:59 +01:00
1 parent 2c0cfcccf2
commit 18d8b70638
6 files changed
+69 -33

No files matched your search

+10 -9
View File
@@ -98,17 +98,18 @@ public sealed class DemoStillVideoTests
async Task WaitAsync(string path, string what)
{
for (var i = 0; i < 600; i++)
// Bounded by the test's own timeout, whatever else the machine does.
while ((await OkAsync(HttpMethod.Get, path)).Bool("running"))
{
if (!(await OkAsync(HttpMethod.Get, path)).Bool("running"))
try
{
return;
await Task.Delay(100, ct);
}
catch (OperationCanceledException)
{
Assert.Fail(what);
}
await Task.Delay(100, ct);
}
Assert.Fail(what);
}
// Two still files, each recorded with its own SHA-256 and served for its video.
@@ -190,10 +191,10 @@ public sealed class DemoStillVideoTests
var again = await OkAsync(HttpMethod.Post, $"/api/media/{mediaId}/still");
Assert.AreEqual(("still", stillMedia.GetProperty("still").Long("frameAtMs")), (again.Str("outcome"), again.Long("frameAtMs")), "the still video again");
// «Cerca i video fermi» over the account: the already analysed are skipped, the rest is «In movimento».
var selection = new { accountId = marta };
var search = await OkAsync(HttpMethod.Post, "/api/still-videos/plan", selection);
Assert.IsGreaterThanOrEqualTo(4, search.Int("alreadyAnalysed"), search.ToString());
Assert.IsGreaterThanOrEqualTo(3, search.Int("alreadyAnalysed"), search.ToString());
Assert.IsGreaterThan(0, search.Int("toAnalyse"), search.ToString());
Assert.IsNull(search.GetProperty("waiting").GetString(), "the demo is never in a session for the job");
await OkAsync(HttpMethod.Post, "/api/still-videos/start", selection);