Azure / Azure/azure-sdk-for-cpp
Support uAMQP unit tests when RTTI is disabled
- Dominant language
- C++
- Stars
- 205
- Forks
- 172
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 37
Description
## Summary
The uAMQP claim-based security unit test uses `dynamic_cast` while handling `Azure::Core::RequestFailedException`. The cast has no RTTI guard.
## Motivation
The default Rust AMQP build excludes the uAMQP test block. A uAMQP unit test build with RTTI disabled can fail to compile or emit MSVC warning C4541. The problem exists on `main` and was not introduced by pull request #7400.
## Proposal
Replace the RTTI-dependent exception inspection with a nested rethrow and typed catch, or guard the test consistently. Add validation for the uAMQP unit test configuration with RTTI disabled.
Found while reviewing #7400.
Contributor guide
Research direction
Start with the uAMQP claim-based security unit test and trace its handling of Azure::Core::RequestFailedException, including the dynamic_cast. Replace or guard the RTTI-dependent inspection as proposed, then validate the uAMQP unit-test configuration with RTTI disabled and confirm it compiles without MSVC warning C4541.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100