Skip to content

Commit 12729b0

Browse files
committed
fix(integration-tests) fix test fixture
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent e4d8a9c commit 12729b0

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/MethodToolCallbackTests.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616

1717
package org.springframework.ai.integration.tests.tool;
1818

19+
import java.util.List;
20+
1921
import org.junit.jupiter.api.Test;
2022
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
2123
import org.slf4j.Logger;
2224
import org.slf4j.LoggerFactory;
25+
2326
import org.springframework.ai.chat.client.ChatClient;
2427
import org.springframework.ai.integration.tests.TestApplication;
2528
import org.springframework.ai.integration.tests.tool.domain.Author;
@@ -32,10 +35,6 @@
3235
import org.springframework.beans.factory.annotation.Autowired;
3336
import org.springframework.boot.test.context.SpringBootTest;
3437

35-
import java.util.List;
36-
import java.util.Map;
37-
import java.util.concurrent.ConcurrentHashMap;
38-
3938
import static org.assertj.core.api.Assertions.assertThat;
4039

4140
/**
@@ -96,7 +95,8 @@ void chatMethodList() {
9695
var content = ChatClient.builder(this.openAiChatModel)
9796
.build()
9897
.prompt()
99-
.user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", "Narnia"))
98+
.user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit",
99+
"The Lion, the Witch and the Wardrobe"))
100100
.tools(tools)
101101
.call()
102102
.content();
@@ -108,7 +108,8 @@ void chatMethodCallback() {
108108
var content = ChatClient.builder(this.openAiChatModel)
109109
.build()
110110
.prompt()
111-
.user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", "Narnia"))
111+
.user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit",
112+
"The Lion, the Witch and the Wardrobe"))
112113
.tools(ToolCallbacks.from(tools))
113114
.call()
114115
.content();

spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/ToolCallingManagerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private void runExplicitToolCallingExecutionWithOptionsStream(ChatOptions chatOp
139139
assertThat(chatResponse).isNotNull();
140140
assertThat(chatResponse.getResult().getOutput().getText()).isNotEmpty()
141141
.contains("His Dark Materials")
142-
.contains("Narnia")
142+
.contains("The Lion, the Witch and the Wardrob")
143143
.contains("The Hobbit")
144144
.contains("The Lord of The Rings")
145145
.contains("The Silmarillion");

0 commit comments

Comments
 (0)