Skip to content

Commit 0cfb84c

Browse files
committed
perf(azure-openai): support HTTP client timeout configuration
Signed-off-by: yinh <[email protected]>
1 parent 27f3cf5 commit 0cfb84c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

auto-configurations/models/spring-ai-autoconfigure-model-azure-openai/src/test/java/org/springframework/ai/model/azure/openai/autoconfigure/AzureOpenAiAutoConfigurationIT.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,13 @@ void openAIClientBuilderCustomizer() {
291291

292292
@Test
293293
void connectTimeoutShouldTakeEffect() {
294-
new ApplicationContextRunner().withPropertyValues(
295-
"spring.ai.azure.openai.connect-timeout=1ms"
296-
)
297-
.withConfiguration(SpringAiTestAutoConfigurations.of(AzureOpenAiChatAutoConfiguration.class))
298-
.run(context -> {
299-
AzureOpenAiChatModel chatModel = context.getBean(AzureOpenAiChatModel.class);
300-
301-
assertThatThrownBy(() -> chatModel.call(new Prompt("Hello")))
302-
.isInstanceOf(Exception.class);
303-
});
294+
new ApplicationContextRunner().withPropertyValues("spring.ai.azure.openai.connect-timeout=1ms")
295+
.withConfiguration(SpringAiTestAutoConfigurations.of(AzureOpenAiChatAutoConfiguration.class))
296+
.run(context -> {
297+
AzureOpenAiChatModel chatModel = context.getBean(AzureOpenAiChatModel.class);
298+
299+
assertThatThrownBy(() -> chatModel.call(new Prompt("Hello"))).isInstanceOf(Exception.class);
300+
});
304301
}
305302

306303
}

0 commit comments

Comments
 (0)