Azure / Azure/azure-sdk-for-rust

[Event Hubs] Add live tests for consumer groups

Open
#4,889 0 comments 1 reaction 1 assignee Claimed by @j7nw4r View on GitHub
Client Event Hubs test-enhancement
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

## Summary

Every live test uses the `$Default` consumer group. The `test-resources.bicep` template already provisions a second consumer group named `defaultGroup`, and no test uses it. The `with_consumer_group` builder option has no live coverage.

## Motivation

Consumer groups give each reader an independent view of a partition. .NET tests that two groups read the same events and that an unknown group returns an error. The Rust SDK supports both, and neither is tested. Part of #4886.

## Proposal

- [ ] Read the same events from two different consumer groups (.NET `ConsumerCanReadFromMultipleConsumerGroups`).
- [ ] Opening a receiver on a consumer group that does not exist returns an error (.NET `ConsumerCannotReadFromInvalidConsumerGroup`).
- [ ] Opening a receiver on a partition id that does not exist returns an error (.NET `ConsumerCannotReadFromInvalidPartition`). The producer side already covers this case in the `get_partition_properties` test.

## Validation

Deploy the test resources with `eng/common/TestResources/New-TestResources.ps1 -ServiceDirectory eventhubs`. Set `EVENTHUBS_HOST` and `EVENTHUB_NAME`. Then run `AZURE_TEST_MODE=live cargo test --package azure_messaging_eventhubs --test '*'`. Each new test passes in live mode.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.