Update Client.connect(transport:) to automatically send initialize request (#100)
* Update Client to automatically call initialize in connect * Make Client.connect(transport:) return value discardable * Fix example usage in README * Update example code in transports to remove initialize call * Deprecate initialize method * Update tests * Update README * Fix sampling tests * Fix race condition tests
This commit is contained in:
parent
3b505ee575
commit
a59b50bf5a
1 changed files with 302 additions and 106 deletions
|
|
@ -99,10 +99,9 @@ struct RoundtripTests {
|
|||
let client = Client(name: "TestClient", version: "1.0")
|
||||
|
||||
try await server.start(transport: serverTransport)
|
||||
try await client.connect(transport: clientTransport)
|
||||
|
||||
let initTask = Task {
|
||||
let result = try await client.initialize()
|
||||
let result = try await client.connect(transport: clientTransport)
|
||||
|
||||
#expect(result.serverInfo.name == "TestServer")
|
||||
#expect(result.serverInfo.version == "1.0.0")
|
||||
|
|
|
|||
Loading…
Reference in a new issue