Skip to content

Commit

Permalink
[azservicebus, azeventhubs] Stress test and logging improvement (#20710)
Browse files Browse the repository at this point in the history
Logging improvements:

* Updating the logging to print more tracing information (per-link) in prep for the bigger release coming up.
* Trimming out some of the verbose logging, seeing if I can get it a bit more reasonable.

Stress tests:

* Add a timestamp to the log name we generate and also default to append, not overwrite.
* Use 0.5 cores, 0.5GB as our baseline. Some pods use more and I'll tune them more later.
  • Loading branch information
richardpark-msft authored May 1, 2023
1 parent 86627ae commit 8ac8c6d
Show file tree
Hide file tree
Showing 23 changed files with 272 additions and 166 deletions.
2 changes: 1 addition & 1 deletion sdk/messaging/azeventhubs/internal/eh/stress/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Set-Location $PSScriptRoot
function deployUsingLocalAddons() {
$azureSDKToolsRoot="<Git clone of azure-sdk-tools>"
$stressTestAddonsFolder = "$azureSDKToolsRoot/tools/stress-cluster/cluster/kubernetes/stress-test-addons"
$clusterResourceGroup = "<Resource Group for Cluster"
$clusterResourceGroup = "<Resource Group for Cluster>"
$clusterSubscription = "<Azure Subscription>"
$helmEnv = "pg2"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
- >
set -ex;
mkdir -p "$DEBUG_SHARE";
/app/stress "{{.Stress.testTarget}}" "-rounds" "{{.Stress.rounds}}" "-prefetch" "{{.Stress.prefetch}}" "{{.Stress.verbose}}" "-sleepAfter" "{{.Stress.sleepAfter}}" | tee "${DEBUG_SHARE}/{{ .Stress.Scenario }}.log";
/app/stress "{{.Stress.testTarget}}" "-rounds" "{{.Stress.rounds}}" "-prefetch" "{{.Stress.prefetch}}" "{{.Stress.verbose}}" "-sleepAfter" "{{.Stress.sleepAfter}}" | tee -a "${DEBUG_SHARE}/{{ .Stress.Scenario }}-`date +%s`.log";
# Pulls the image on pod start, always. We tend to push to the same image and tag over and over again
# when iterating, so this is a must.
imagePullPolicy: Always
Expand All @@ -33,8 +33,8 @@ spec:
# just uses 'limits' for both.
resources:
limits:
memory: "1.5Gi"
cpu: "1"
memory: "0.5Gi"
cpu: "0.5"
{{- include "stress-test-addons.container-env" . | nindent 6 }}
{{- end -}}

Expand Down
12 changes: 7 additions & 5 deletions sdk/messaging/azservicebus/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,16 @@ func TestClientUnauthorizedCreds(t *testing.T) {
})

t.Run("invalid identity creds", func(t *testing.T) {
tenantID := os.Getenv("AZURE_TENANT_ID")
clientID := os.Getenv("AZURE_CLIENT_ID")
endpoint := os.Getenv("SERVICEBUS_ENDPOINT")
identityVars := test.GetIdentityVars(t)

cliCred, err := azidentity.NewClientSecretCredential(tenantID, clientID, "bogus-client-secret", nil)
if identityVars == nil {
return
}

cliCred, err := azidentity.NewClientSecretCredential(identityVars.TenantID, identityVars.ClientID, "bogus-client-secret", nil)
require.NoError(t, err)

client, err := NewClient(endpoint, cliCred, nil)
client, err := NewClient(identityVars.Endpoint, cliCred, nil)
require.NoError(t, err)

defer test.RequireClose(t, client)
Expand Down
Loading

0 comments on commit 8ac8c6d

Please sign in to comment.