Update reviewed phase details, enhance presence tests for hiring and assigning teachers during lessons, and fix timetable handling in the School class. Added new tests for presence management and ensured proper campus staffing behavior during lesson transitions.
ci / server (push) Failing after 4m0s
ci / client (push) Successful in 17s

This commit is contained in:
Leonid Pershin
2026-08-20 02:47:24 +03:00
parent 2833a09799
commit cbe739a4e6
4 changed files with 159 additions and 22 deletions
@@ -212,6 +212,10 @@ public class GameSocketTests(AppHostFixture fixture)
// one person made this test fail under load.
await SendAsync(socket, buffer =>
ProtocolCodec.WriteSetRunning(buffer, new ClientSetRunningMessage(Running: true)));
// Presence still goes out while paused (empty people, lesson labels from the table).
// Waiting for people first drains those frames and can spend the 40-frame budget
// before the resume even lands. Clock.Running is the signal that time is moving.
await ReceiveClockWhereAsync(socket, clock => clock.Running);
presence = await ReceivePresenceWhereAsync(socket, frame => frame.People.Count > 0);
Assert.All(presence.People, person => Assert.False(string.IsNullOrWhiteSpace(person.NodeId)));
Assert.Contains(presence.People, person => directory.People.Any(row => row.Id == person.Id));