E5: commenti di FebeApp e «Riprendi ora» senza segnale a lavoratore fermo
La proprietà AutoExportStarted stava fra la documentazione di StartedMessage e il metodo; il riassunto di DisposeAsync non diceva che la copia automatica si ferma per prima. L'API «Riprendi ora» chiede una passata solo se il lavoratore gira davvero: è registrato sempre, ma nella dimostrazione e in un avvio con problemi non gira e nessuno ascolta il segnale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ff748db6f
commit
c0e04d2930
3 files changed
+16
-7
No files matched your search
@@ -368,6 +368,14 @@ public sealed partial class ExportApiTests
|
||||
var worker = server.App.Services.GetRequiredService<AutoExportWorker>();
|
||||
Assert.AreEqual(JsonValueKind.Null, (await server.GetJsonAsync("/api/export")).GetProperty("automatic").ValueKind, "not started yet");
|
||||
|
||||
// Registered but not running: «Riprendi ora» releases the hold and asks no pass, since nothing listens.
|
||||
var idle = await server.App.Services.GetRequiredService<ExportHub>().GetAsync();
|
||||
idle.HoldAutomatic(clock.Now + TimeSpan.FromHours(1));
|
||||
var signals = signal.Count;
|
||||
Assert.AreEqual(HttpStatusCode.OK, (await server.SendJsonAsync(HttpMethod.Post, "/api/export/automatic/resume")).Status);
|
||||
Assert.IsNull(idle.AutomaticHeldUntil);
|
||||
Assert.AreEqual(signals, signal.Count, "no signal without the loop");
|
||||
|
||||
using var stop = new CancellationTokenSource();
|
||||
var loop = Task.Run(() => worker.RunAsync(stop.Token));
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user