Skip to content

Commit

Permalink
disable verySmallTimeOutErrors test points, since they are flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
ccreutzi committed May 27, 2024
1 parent 61a5152 commit 9914a55
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions tests/tazureChat.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ function doGenerate(testCase)
testCase.verifyGreaterThan(strlength(response),0);
end

function verySmallTimeOutErrors(testCase)
chat = azureChat(getenv("AZURE_OPENAI_ENDPOINT"), getenv("AZURE_OPENAI_DEPLOYMENT"), TimeOut=1e-10, ApiKey="false-key");
testCase.verifyError(@()generate(chat, "hi"), "MATLAB:webservices:Timeout")
end
%% Test is currently unreliable, reasons unclear
% function verySmallTimeOutErrors(testCase)
% chat = azureChat(getenv("AZURE_OPENAI_ENDPOINT"), getenv("AZURE_OPENAI_DEPLOYMENT"), TimeOut=1e-10, ApiKey="false-key");
% testCase.verifyError(@()generate(chat, "hi"), "MATLAB:webservices:Timeout")
% end

function errorsWhenPassingToolChoiceWithEmptyTools(testCase)
chat = azureChat(getenv("AZURE_OPENAI_ENDPOINT"), getenv("AZURE_OPENAI_DEPLOYMENT"), ApiKey="this-is-not-a-real-key");
Expand Down
7 changes: 4 additions & 3 deletions tests/textractOpenAIEmbeddings.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ function useAllNVP(testCase)
ApiKey="this-is-not-a-real-key", TimeOut=10));
end

function verySmallTimeOutErrors(testCase)
testCase.verifyError(@()extractOpenAIEmbeddings("bla", TimeOut=0.0001, ApiKey="false-key"), "MATLAB:webservices:Timeout")
end
%% Test is currently unreliable, reasons unclear
% function verySmallTimeOutErrors(testCase)
% testCase.verifyError(@()extractOpenAIEmbeddings("bla", TimeOut=0.0001, ApiKey="false-key"), "MATLAB:webservices:Timeout")
% end

function testInvalidInputs(testCase, InvalidInput)
testCase.verifyError(@()extractOpenAIEmbeddings(InvalidInput.Input{:}), InvalidInput.Error);
Expand Down
10 changes: 5 additions & 5 deletions tests/topenAIChat.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function validConstructorCalls(testCase,ValidConstructorInput)
end
end

function verySmallTimeOutErrors(testCase)
chat = openAIChat(TimeOut=0.0001, ApiKey="false-key");

testCase.verifyError(@()generate(chat, "hi"), "MATLAB:webservices:Timeout")
end
%% Test is currently unreliable, reasons unclear
% function verySmallTimeOutErrors(testCase)
% chat = openAIChat(TimeOut=0.0001, ApiKey="false-key");
% testCase.verifyError(@()generate(chat, "hi"), "MATLAB:webservices:Timeout")
% end

function errorsWhenPassingToolChoiceWithEmptyTools(testCase)
chat = openAIChat(ApiKey="this-is-not-a-real-key");
Expand Down

0 comments on commit 9914a55

Please sign in to comment.