Increase test coverage for OpenAIAsyncClient and OpenAIClient#44678
Increase test coverage for OpenAIAsyncClient and OpenAIClient#44678mssfang merged 30 commits intoAzure:mainfrom
Conversation
|
Thank you for your contribution @v-cristhianh! We will review the pull request and get back to you soon. |
fa8bd5e to
ad22d77
Compare
sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java
Outdated
Show resolved
Hide resolved
|
API change check APIView has identified API level changes in this PR and created following API reviews. |
sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java
Outdated
Show resolved
Hide resolved
fed63f0 to
8a90ce6
Compare
sdk/openai/azure-ai-openai/src/test/java/com/azure/ai/openai/OpenAIAsyncClientTest.java
Outdated
Show resolved
Hide resolved
7daaef2 to
0a32c49
Compare
2c8c75e to
82cae6d
Compare
jpalvarezl
left a comment
There was a problem hiding this comment.
Looking really good. Thank you! Once you write the sync version of these tests and then add a copy to the NonAzureOpenAIAsyncClientTest (you pretty much just need to copy and paste everything you've just done, except you need to change the method you use for initializing client in the test.
sdk/openai/azure-ai-openai/src/test/java/com/azure/ai/openai/OpenAIAsyncClientTest.java
Outdated
Show resolved
Hide resolved
sdk/openai/azure-ai-openai/src/test/java/com/azure/ai/openai/OpenAIAsyncClientTest.java
Show resolved
Hide resolved
sdk/openai/azure-ai-openai/src/test/java/com/azure/ai/openai/OpenAIAsyncClientTest.java
Outdated
Show resolved
Hide resolved
sdk/openai/azure-ai-openai/src/test/java/com/azure/ai/openai/OpenAIAsyncClientTest.java
Outdated
Show resolved
Hide resolved
sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java
Show resolved
Hide resolved
82cae6d to
c71308c
Compare
fb3797c to
39bdf39
Compare
39bdf39 to
0ea35f1
Compare
jpalvarezl
left a comment
There was a problem hiding this comment.
I am seeing issues with these tests being run in LIVE. Just to name a couple:
- Non Azure OpenAI tests should use, i.e.
getAudioTranslationRunnerForNonAzureinstead ofgetAudioTranslationRunner(model/deployment names are different) - Non Azure OpenAI has different error codes.
404->400or the other way around. - There style check issues that would be solved if you run
mvn clean installlocally.
jpalvarezl
left a comment
There was a problem hiding this comment.
Pushed the new recordings, however I had to remove the tests for using StreamOptions as they were still failing.
I think there could be a model compatibility issue. Let's punt those to a separate PR.
@microsoft-github-policy-service agree company="Aditi Consulting LLC" |
|
/check-enforcer override |
Description
Test coverage for the file OpenAIAsyncClient.java has increased from 81% to 87%:


Also increased from 80% to 87% the file OpenAIClient.java:
Theses changes can be verified in the JaCoCo report after running mvn clean install.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines