Skip to content

[Messaging] Add In Negative Testing #24846

Closed

Description

To maintain parity between exceptions between pyamqp and uamqp add in negative tests to expose behavior/exceptions during a failure.

cases to test:

  • when creating client with DefaultAzureCredential, pass in fully_qualified_namespace=None.
  • In pyamqp: gives us 'can only concatenate str (not "NoneType") to str\ncan only concatenate str (not "NoneType") to str'). This is b/c the AMQPClient._hostname = None, so in def _open, creating Connection object with "amqps://" + self._hostname gives us error.
  • passing None in as sas_policy and key in EventHubSharedKeyCredential
  • in pyamqp, error:
  • in uamqp, error:
  • token auth failure/bad signature:
  • pyamqp:
    azure.eventhub._pyamqp.error.TokenAuthFailure: CBS Token authentication failed.
    Status code: 401
    Description: InvalidSignature: The token has an invalid signature. TrackingId:14e015a9-f58f-44ec-8030-0faf2ec77923, SystemTracker:NoSystemTracker, Timestamp:2022-05-12T16:19:46
  • for uamqp error is: Authentication Put-Token failed. Retries exhausted.
  • for credentials: note that a bad/expired token will be checked during client creation. For pyamqp, it looks like this token failure is not being retried. Need to double check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions