Test: wait for the guest's sheet before comparing it
The sheet arrives over the socket just after connected flips, so on a slower runner the comparison raced it (ScorekeeperSessionTest, line 167). Same pattern the sibling test already uses. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdMNbY5hLR7FjtfEE712xG
This commit is contained in:
@@ -164,6 +164,9 @@ class ScorekeeperSessionTest {
|
||||
|
||||
await("the guest to be let in") { guest.state.value.connected }
|
||||
assertFalse(guest.state.value.awaiting)
|
||||
// The sheet follows the connection over the socket, so on a slow runner
|
||||
// it can still be in flight when `connected` flips: wait for it.
|
||||
await("the guest to receive the sheet") { guest.state.value.sheet == host.state.sheet }
|
||||
assertEquals(host.state.sheet, guest.state.value.sheet)
|
||||
assertTrue(guest.state.value.sheet.started)
|
||||
assertTrue(host.state.requests.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user