Skip to content

Commit 1faa82f

Browse files
[azeventhubs/azservicebus] Adding some readmes for the stress tests in case anyone else wants to try it out. (Azure#20829)
Gives a light introduction to what the structure is, and a link to the documentation. Fixes Azure#19256
1 parent 41d242d commit 1faa82f

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Event Hubs package reliability tests
2+
3+
These are the stress/reliability tests for the `azeventhubs` package.
4+
5+
The entrypoint for the tests is [`stress.go`](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/internal/eh/stress/stress.go). All of the individual tests are in the `tests` sub-folder. These tests should run fine on your local machine - you'll need to create an `.env` file, in the root of the `azeventhubs` module, with the following values:
6+
7+
```bash
8+
EVENTHUB_CONNECTION_STRING=<connection string to the Event Hubs namespace>
9+
EVENTHUB_NAME=<already created Event Hub - should have at least 4 partitions>
10+
CHECKPOINTSTORE_STORAGE_CONNECTION_STRING=<connection string to an Azure Storage account>
11+
APPINSIGHTS_INSTRUMENTATIONKEY=<instrumentation key for appinsights>
12+
```
13+
14+
There are two types of tests - batch and processor. Each test takes a variety of flags to control the duration, number of events, etc..
15+
16+
For instance, to run a `Processor` test to receive events:
17+
18+
```bash
19+
go run . processor
20+
```
21+
22+
To see more options just run:
23+
24+
```bash
25+
go run . processor --help
26+
```
27+
28+
For convenience there's a deploy.ps1 file that'll launch the deployment - by default it'll go to the `pg` cluster, which we use for adhoc workloads. For more information about prerequisites look at the official stress test docs here: [stress test readme.md](https://github.com/Azure/azure-sdk-tools/tree/main/tools/stress-cluster/chaos).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Service Bus package reliability tests
2+
3+
These are the stress/reliability tests for the `azservicebus` package.
4+
5+
The entrypoint for the tests is [`stress.go`](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azservicebus/internal/stress/stress.go). All of the individual tests are in the `tests` sub-folder. These tests should run fine on your local machine - you'll need to create an `.env` file with the following values:
6+
7+
```bash
8+
SERVICEBUS_CONNECTION_STRING=<connection string to the Service Bus namespace>
9+
APPINSIGHTS_INSTRUMENTATIONKEY=<instrumentation key for appinsights>
10+
```
11+
12+
To run one of the more basic tests, where we just send and receive messages for a few days:
13+
14+
```bash
15+
go run . tests infiniteSendAndReceive
16+
```
17+
18+
To see all the tests that are available:
19+
20+
```bash
21+
go run . tests
22+
```
23+
24+
For convenience there's a deploy.ps1 file that'll launch the deployment - by default it'll go to the `pg` cluster, which we use for adhoc workloads. For more information about prerequisites look at the official stress test docs here: [stress test readme.md](https://github.com/Azure/azure-sdk-tools/tree/main/tools/stress-cluster/chaos).

0 commit comments

Comments
 (0)