Recover background chat observers from durable live membership
This commit is contained in:
@@ -85,7 +85,13 @@ func testChatShellOutputOwnedAndForeign(t *testing.T, exited bool) {
|
||||
if err := store.RecordOperatorSession(ctx, LargeChatFixtureSessionID, t.TempDir(), "owned", protocol.ChatSessionTagOperator); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
srv := httptest.NewServer(HandlerWithOptions(ctx, Options{Chat: opencode.NewChat(attached.Connection), OperatorRegistry: store}))
|
||||
handler := HandlerWithOptions(ctx, Options{Chat: opencode.NewChat(attached.Connection), OperatorRegistry: store}).(*runHandler)
|
||||
srv := httptest.NewServer(handler)
|
||||
select {
|
||||
case <-handler.hub.recoveryDone:
|
||||
case <-ctx.Done():
|
||||
t.Fatal("startup recovery did not finish")
|
||||
}
|
||||
defer srv.Close()
|
||||
ws := dialShellOutputWebsocket(t, ctx, srv)
|
||||
defer ws.CloseNow()
|
||||
|
||||
Reference in New Issue
Block a user