modelcontextprotocol / modelcontextprotocol/java-sdk
Bad assertion in testCallTool
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 3.7k
- フォーク
- 1.1k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 9
説明
In AbstractMcpSyncClientTests, there is a test case called {testCallTool](https://github.com/modelcontextprotocol/java-sdk/blob/110a8d1940ca2edf45524332dcc84b606e52d879/mcp/src/test/java/io/modelcontextprotocol/client/AbstractMcpSyncClientTests.java#L238)
on line 247 is this assertion:
assertThat(result.isError()).isNull();
Although currently satisfied by the 'everything server' (assertion passes with javascript server) this assumes that the result.isError() (a Boolean value) is null if there is no error. Since 'isError() is set to 'false' and not null on success (by java server at least) this line should probably be:
assertThat(result.isError()).isFalse();
and that the everything server should be fixed to return isError=false rather than isError=null as it does currently.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
mcp/src/test/java/io/modelcontextprotocol/client/AbstractMcpSyncClientTests.java の testCallTool と、247 行目付近にあるそのアサーションから始めてください。everything server の成功レスポンスも確認してください。成功した結果で isError() is false が assert され、everything server が null ではなく false を返せば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, javascript
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 75/100