Skip to content

Commit 4ab3d57

Browse files
authored
.Net: Adding retry to flakey test and switch to a different model (#12439)
### Description Adding retry to flakey test and switch to a different model ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
1 parent dfbc993 commit 4ab3d57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dotnet/src/IntegrationTests/Connectors/OpenAI/OpenAIChatCompletion_NonStreamingTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.SemanticKernel.TextGeneration;
1414
using OpenAI.Chat;
1515
using SemanticKernel.IntegrationTests.TestSettings;
16+
using xRetry;
1617
using Xunit;
1718

1819
namespace SemanticKernel.IntegrationTests.Connectors.OpenAI;
@@ -142,11 +143,11 @@ public async Task TextGenerationShouldReturnMetadataAsync()
142143
Assert.Empty((logProbabilityInfo as IReadOnlyList<ChatTokenLogProbabilityDetails>)!);
143144
}
144145

145-
[Fact]
146+
[RetryFact]
146147
public async Task ChatCompletionWithWebSearchAsync()
147148
{
148149
// Arrange
149-
var kernel = this.CreateAndInitializeKernel(modelIdOverride: "gpt-4o-mini-search-preview");
150+
var kernel = this.CreateAndInitializeKernel(modelIdOverride: "gpt-4o-search-preview");
150151
var chatService = kernel.Services.GetRequiredService<IChatCompletionService>();
151152
var settings = new OpenAIPromptExecutionSettings
152153
{

0 commit comments

Comments
 (0)