mcp: establish the streamable client standalone SSE stream in Connect (#604)
When Connect returns, client should be guaranteed that the streamable SSE stream is connected. Fixes #583
This commit is contained in:
parent
80abbe6171
commit
ae6bda692b
1 changed files with 118 additions and 159 deletions
|
|
@ -594,14 +594,7 @@ func TestServerInitiatedSSE(t *testing.T) {
|
|||
notifications := make(chan string)
|
||||
server := NewServer(testImpl, nil)
|
||||
|
||||
opts := &StreamableHTTPOptions{
|
||||
// TODO(#583): for now, this is required for guaranteed message delivery.
|
||||
// However, it shouldn't be necessary to use replay here, as we should be
|
||||
// guaranteed that the standalone SSE stream is started by the time the
|
||||
// client is connected.
|
||||
EventStore: NewMemoryEventStore(nil),
|
||||
}
|
||||
httpServer := httptest.NewServer(mustNotPanic(t, NewStreamableHTTPHandler(func(*http.Request) *Server { return server }, opts)))
|
||||
httpServer := httptest.NewServer(mustNotPanic(t, NewStreamableHTTPHandler(func(*http.Request) *Server { return server }, nil)))
|
||||
defer httpServer.Close()
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
|
|
|
|||
Loading…
Reference in a new issue