Bad assertion in testCallTool
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java, javascript
- Domain
- testing
Research direction
Start in mcp/src/test/java/io/modelcontextprotocol/client/AbstractMcpSyncClientTests.java at testCallTool and its assertion around line 247. Check the everything server's success response as well. Done means successful results assert isError() is false and the everything server returns false rather than null.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 1.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/java-sdk
-
area/transport bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
modelcontextprotocol/java-sdk#1136 ·
-
area/client bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/java-sdk#1124 · 1 comment ·
-
ServerCapabilities.logging is added unconditionally, overriding the caller's explicit capabilities Openbug P2 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/java-sdk#1086 · 1 comment ·
-
enhancement good first issue P3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
modelcontextprotocol/java-sdk#1067 ·
-
bug P2 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
modelcontextprotocol/java-sdk#898 · 1 comment ·
All issues in modelcontextprotocol/java-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100