Correzione: la prova da capo a fondo del server non perde più la prima sessione
«Tempo scaduto: tre file di marta.prova scaricati» era un difetto della prova: l'orologio compresso sommava le attese dei lavori di sottofondo (circa 34 volte invece di 10, a salti) e consumava in un attimo i limiti delle pagine vere e la prima sessione; inoltre il motore apriva la sua sessione a «Ho finito», prima di «Controlla ora», con luca.prova per primo. Finita la sessione, i file aspettavano la prossima: 120 secondi veri, più dei 90 della prova. Ora le composizioni intere usano ScaledClock (attese sovrapposte = stesso tempo, 5 volte), la sola sessione è quella chiesta con «Controlla ora», e un'attesa scaduta dice che cosa faceva Febe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6d66cf96d3
commit
66a3873554
12 files changed
+242
-83
No files matched your search
@@ -3,6 +3,7 @@ using System.Net.WebSockets;
|
||||
using System.Text;
|
||||
using Febe.Server;
|
||||
using Febe.Tests.Server.Support;
|
||||
using Febe.Tests.Support;
|
||||
using Febe.Tests.Web.Support;
|
||||
using Febe.Web;
|
||||
using Febe.Web.Connection;
|
||||
@@ -74,7 +75,7 @@ public sealed class RemoteViewSocketTests
|
||||
await socket.SendAsync(Encoding.UTF8.GetBytes(message), WebSocketMessageType.Text, true, TestContext.CancellationToken);
|
||||
}
|
||||
|
||||
await ServerTestBed.WaitUntilAsync(() => Task.FromResult(view.Inputs.Count >= 4), TimeSpan.FromSeconds(10), "quattro gesti inoltrati");
|
||||
await TestWait.UntilAsync(() => view.Inputs.Count >= 4, "quattro gesti inoltrati");
|
||||
await Task.Delay(200);
|
||||
var inputs = view.Inputs.ToArray();
|
||||
Assert.HasCount(4, inputs, "out-of-range, unknown and malformed messages are dropped");
|
||||
@@ -90,7 +91,7 @@ public sealed class RemoteViewSocketTests
|
||||
Assert.AreEqual(RemoteViewNavigation.Back, inputs[3]);
|
||||
|
||||
await socket.CloseAsync(WebSocketCloseStatus.NormalClosure, "fine", TestContext.CancellationToken);
|
||||
await ServerTestBed.WaitUntilAsync(() => Task.FromResult(view.Disposed), TimeSpan.FromSeconds(10), "la vista chiusa dal server");
|
||||
await TestWait.UntilAsync(() => view.Disposed, "la vista chiusa dal server");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -106,7 +107,7 @@ public sealed class RemoteViewSocketTests
|
||||
|
||||
await second.SendAsync(new byte[RemoteViewSocket.MaxMessageBytes + 10], WebSocketMessageType.Text, true, TestContext.CancellationToken);
|
||||
await ExpectCloseAsync(second, WebSocketCloseStatus.MessageTooBig);
|
||||
await ServerTestBed.WaitUntilAsync(() => Task.FromResult(host.Opened[1].Disposed), TimeSpan.FromSeconds(10), "la vista chiusa");
|
||||
await TestWait.UntilAsync(() => host.Opened[1].Disposed, "la vista chiusa");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in new issue
Block a user