Update async legacy module to newer async module in authenticate_with_azure_named_key_credential_async.py
@@ -41,7 +41,6 @@ async def authenticate_with_named_key():
event_data_batch.add(EventData('Single message'))
await producer_client.send_batch(event_data_batch)
-loop = asyncio.get_event_loop()
start_time = time.time()
-loop.run_until_complete(authenticate_with_named_key())
+asyncio.run(authenticate_with_named_key())
print("Send messages in {} seconds.".format(time.time() - start_time))
