Skip to content

Commit

Permalink
Add and use max parallel for azopenai tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed Oct 3, 2023
1 parent d758c2b commit f59bd6a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parameters:
- name: EnvVars
type: object
default: {}
- name: MaxParallel
type: number
default: 0
- name: Clouds
type: string
default: 'Public'
Expand Down Expand Up @@ -186,6 +189,7 @@ stages:
AdditionalParameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
EnvVars: ${{ parameters.EnvVars }}
MaxParallel: ${{ parameters.MaxParallel }}
TimeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
Location: ${{ parameters.Location }}
PreSteps:
Expand Down
5 changes: 4 additions & 1 deletion eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ parameters:
- name: EnvVars
type: object
default: {}
- name: MaxParallel
type: number
default: 0
- name: TimeoutInMinutes
type: number
default: 60
Expand Down Expand Up @@ -38,7 +41,7 @@ jobs:
dependsOn: ${{ parameters.DependsOn }}
condition: and(succeededOrFailed(), ne(${{ parameters.Matrix }}, '{}'))
strategy:
maxParallel: 0
maxParallel: ${{ parameters.MaxParallel }}
matrix: $[ ${{ parameters.Matrix }} ]

variables:
Expand Down
6 changes: 6 additions & 0 deletions sdk/ai/azopenai/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ stages:
parameters:
ServiceDirectory: "ai/azopenai"
RunLiveTests: true
# The testing openai account is a shared resource and gets throttled if
# we run too many tests in parallel
# Only affects the following tests:
# TestGetChatCompletions_usingFunctions
# TestGetChatCompletions_usingFunctions/OpenAI
MaxParallel: 1
CloudConfig:
Public:
SubscriptionConfigurations:
Expand Down

0 comments on commit f59bd6a

Please sign in to comment.