Skip to content

Commit abd1bbf

Browse files
authored
[Service Bus] fix async auth test (#18499)
found that `test_auth_async/test_client_azure_sas_credential_async` was failing in the uamqp pipeline, but was getting skipped in the eventhub livetest pipeline for some reason.
1 parent ab7a3c4 commit abd1bbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_auth_async.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ async def test_client_azure_sas_credential_async(self,
122122
batch.add(EventData(body='A single message'))
123123
await producer_client.send_batch(batch)
124124

125+
credential = EventHubSharedKeyCredential(eventhub_namespace_key_name, eventhub_namespace_primary_key)
125126
hostname = "{}.servicebus.windows.net".format(eventhub_namespace.name)
126127
auth_uri = "sb://{}/{}".format(hostname, eventhub.name)
127-
token = (await credential.get_token(auth_uri)).token
128+
token = (await credential.get_token(auth_uri)).token.decode()
128129
producer_client = EventHubProducerClient(fully_qualified_namespace=hostname,
129130
eventhub_name=eventhub.name,
130131
credential=AzureSasCredential(token))

0 commit comments

Comments
 (0)