Skip to content

Commit 56ac4be

Browse files
authored
chore: Use default protocol version in tests (#582)
1 parent 3947f26 commit 56ac4be

4 files changed

Lines changed: 0 additions & 17 deletions

File tree

spec/src/main/java/io/a2a/util/Utils.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ public class Utils {
3838

3939
private static final Logger log = Logger.getLogger(Utils.class.getName());
4040

41-
/**
42-
* Specification version constant for deprecation annotations.
43-
*/
44-
public static final String SPEC_VERSION_1_0 = "1.0";
45-
4641
/**
4742
* Returns the provided value if non-null, otherwise returns the default value.
4843
* <p>

transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,6 @@ public void testVersionNotSupportedErrorOnSendMessage() throws Exception {
966966
.defaultInputModes(List.of("text"))
967967
.defaultOutputModes(List.of("text"))
968968
.skills(List.of())
969-
.protocolVersion("1.0")
970969
.build();
971970

972971
// Create handler that provides incompatible version 2.0 in the context
@@ -1012,7 +1011,6 @@ public void testVersionNotSupportedErrorOnSendStreamingMessage() throws Exceptio
10121011
.defaultInputModes(List.of("text"))
10131012
.defaultOutputModes(List.of("text"))
10141013
.skills(List.of())
1015-
.protocolVersion("1.0")
10161014
.build();
10171015

10181016
// Create handler that provides incompatible version 2.0 in the context
@@ -1058,7 +1056,6 @@ public void testCompatibleVersionSuccess() throws Exception {
10581056
.defaultInputModes(List.of("text"))
10591057
.defaultOutputModes(List.of("text"))
10601058
.skills(List.of())
1061-
.protocolVersion("1.0")
10621059
.build();
10631060

10641061
// Create handler that provides compatible version 1.1 in the context
@@ -1110,7 +1107,6 @@ public void testNoVersionDefaultsToCurrentVersionSuccess() throws Exception {
11101107
.defaultInputModes(List.of("text"))
11111108
.defaultOutputModes(List.of("text"))
11121109
.skills(List.of())
1113-
.protocolVersion("1.0")
11141110
.build();
11151111

11161112
// Create handler that provides null version (should default to 1.0)

transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,6 @@ public void testVersionNotSupportedErrorOnMessageSend() {
17811781
.defaultInputModes(List.of("text"))
17821782
.defaultOutputModes(List.of("text"))
17831783
.skills(List.of())
1784-
.protocolVersion("1.0")
17851784
.build();
17861785

17871786
JSONRPCHandler handler = new JSONRPCHandler(agentCard, requestHandler, internalExecutor);
@@ -1821,7 +1820,6 @@ public void testVersionNotSupportedErrorOnMessageSendStream() throws Exception {
18211820
.defaultInputModes(List.of("text"))
18221821
.defaultOutputModes(List.of("text"))
18231822
.skills(List.of())
1824-
.protocolVersion("1.0")
18251823
.build();
18261824

18271825
JSONRPCHandler handler = new JSONRPCHandler(agentCard, requestHandler, internalExecutor);
@@ -1898,7 +1896,6 @@ public void testCompatibleVersionSuccess() {
18981896
.defaultInputModes(List.of("text"))
18991897
.defaultOutputModes(List.of("text"))
19001898
.skills(List.of())
1901-
.protocolVersion("1.0")
19021899
.build();
19031900

19041901
JSONRPCHandler handler = new JSONRPCHandler(agentCard, requestHandler, internalExecutor);
@@ -1942,7 +1939,6 @@ public void testNoVersionDefaultsToCurrentVersionSuccess() {
19421939
.defaultInputModes(List.of("text"))
19431940
.defaultOutputModes(List.of("text"))
19441941
.skills(List.of())
1945-
.protocolVersion("1.0")
19461942
.build();
19471943

19481944
JSONRPCHandler handler = new JSONRPCHandler(agentCard, requestHandler, internalExecutor);

transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,6 @@ public void testVersionNotSupportedErrorOnSendMessage() {
653653
.defaultInputModes(List.of("text"))
654654
.defaultOutputModes(List.of("text"))
655655
.skills(List.of())
656-
.protocolVersion("1.0")
657656
.build();
658657

659658
RestHandler handler = new RestHandler(agentCard, requestHandler, internalExecutor);
@@ -705,7 +704,6 @@ public void testVersionNotSupportedErrorOnSendStreamingMessage() {
705704
.defaultInputModes(List.of("text"))
706705
.defaultOutputModes(List.of("text"))
707706
.skills(List.of())
708-
.protocolVersion("1.0")
709707
.build();
710708

711709
RestHandler handler = new RestHandler(agentCard, requestHandler, internalExecutor);
@@ -794,7 +792,6 @@ public void testCompatibleVersionSuccess() {
794792
.defaultInputModes(List.of("text"))
795793
.defaultOutputModes(List.of("text"))
796794
.skills(List.of())
797-
.protocolVersion("1.0")
798795
.build();
799796

800797
RestHandler handler = new RestHandler(agentCard, requestHandler, internalExecutor);
@@ -850,7 +847,6 @@ public void testNoVersionDefaultsToCurrentVersionSuccess() {
850847
.defaultInputModes(List.of("text"))
851848
.defaultOutputModes(List.of("text"))
852849
.skills(List.of())
853-
.protocolVersion("1.0")
854850
.build();
855851

856852
RestHandler handler = new RestHandler(agentCard, requestHandler, internalExecutor);

0 commit comments

Comments
 (0)