Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.55k stars 2.77k forks source link

[Service Bus & Event Hubs] Improve livetest test stability #21789

Closed yunhaoling closed 11 months ago

yunhaoling commented 2 years ago
swathipil commented 2 years ago

check devops and check if something can be combined with stress test onboarding

swathipil commented 2 years ago

SB test flaky: test_queue_send_twice: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1321365&view=logs&j=217ad987-cc73-5dcd-abbd-eb23972de726&t=f10366f4-42a0-5bf3-0a2a-6be221a21989&l=1873

swathipil commented 2 years ago

update:

EH: tests/livetest/synctests/test_consumer_client.py::test_receive_batch_no_max_wait_time

SB: FAILED tests/test_subscriptions.py::ServiceBusSubscriptionTests::test_subscription_by_servicebus_client_receive_batch_with_deadletter: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1326700&view=logs&j=fa284728-64c9-5de0-4442-32743d14c85e&t=b93d123d-eb8b-5272-3a5e-e2a5347ca4ca&l=2272 FAILED tests/async_tests/test_queues_async.py::ServiceBusQueueAsyncTests::test_async_queue_by_servicebus_client_browse_messages_with_receiver FAILED tests\test_queues.py::ServiceBusQueueTests::test_queue_by_queue_client_conn_str_receive_handler_with_autolockrenew - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1326700&view=logs&j=217ad987-cc73-5dcd-abbd-eb23972de726&t=f10366f4-42a0-5bf3-0a2a-6be221a21989&l=2126 FAILED tests/test_queues.py::ServiceBusQueueTests::test_queue_send_dict_messages_scheduled FAILED tests/test_queues.py::ServiceBusQueueTests::test_queue_operation_negative

swathipil commented 2 years ago

check 12/28: FAILED tests/async_tests/test_queues_async.py::ServiceBusQueueAsyncTests::test_async_queue_by_queue_client_conn_str_receive_handler_peeklock

12/31: FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_by_servicebus_client_session_pool FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_by_servicebus_client_session_pool FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_connection_failure_is_idempotent FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_connection_failure_is_idempotent FAILED tests/async_tests/test_queues_async.py::ServiceBusQueueAsyncTests::test_async_queue_receiver_respects_max_wait_time_overrides FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_by_servicebus_client_session_pool FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_by_session_client_conn_str_receive_handler_with_no_session FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_cancel_scheduled_messages FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_cancel_scheduled_messages FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_by_servicebus_client_session_pool FAILED tests/async_tests/test_queues_async.py::ServiceBusQueueAsyncTests::test_async_queue_receiver_respects_max_wait_time_overrides FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_by_servicebus_client_session_pool FAILED tests/async_tests/test_sessions_async.py::ServiceBusAsyncSessionTests::test_async_session_by_session_client_conn_str_receive_handler_with_no_session FAILED tests/async_tests/test_subscriptions_async.py::ServiceBusSubscriptionAsyncTests::test_topic_by_servicebus_client_receive_batch_with_deadletter FAILED tests/test_queues.py::ServiceBusQueueTests::test_queue_receive_keep_conn_alive FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_by_servicebus_client_session_pool FAILED tests/test_sessions.py::ServiceBusSessionTests::test_session_connection_failure_is_idempotent FAILED tests/async_tests/test_queues_async.py::ServiceBusQueueAsyncTests::test_queue_receive_keep_conn_alive_async FAILED tests/mgmt_tests/test_mgmt_namespaces.py::ServiceBusManagementClientNamespaceTests::test_mgmt_namespace_get_properties

FIX: async/sync test_session_by_servicebus_client_session_pool: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1336668&view=logs&j=a5c73adf-21c4-51b0-3477-575974909b75&t=920caeb1-8790-523a-08a8-f5f4e4c5560b&l=1787

swathipil commented 2 years ago

A lot of these are failing b/c of this error: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1343200&view=logs&j=fe7804ca-eaac-501a-67e8-e2604a50cb52&t=581043c6-4578-52e9-e224-2083bb8809be&l=3251 and this: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1343200&view=logs&j=fe7804ca-eaac-501a-67e8-e2604a50cb52&t=581043c6-4578-52e9-e224-2083bb8809be&l=2979 And this one with Auth Timeout: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1343200&view=logs&j=fe7804ca-eaac-501a-67e8-e2604a50cb52&t=581043c6-4578-52e9-e224-2083bb8809be&l=1947

swathipil commented 2 years ago

receive_handler_with_auto_lock_renew: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1349066&view=logs&j=36c1d9f8-0c10-5405-9a7f-ac15f4c32de9&t=654dbbb3-fbc2-5bfe-7f7d-126a91b09b22&l=2191

swathipil commented 2 years ago

iter_with_defer_not_found: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1355297&view=logs&j=fa284728-64c9-5de0-4442-32743d14c85e&t=b93d123d-eb8b-5272-3a5e-e2a5347ca4ca&l=2009 test_message_lock_renew: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1358691&view=logs&j=217ad987-cc73-5dcd-abbd-eb23972de726&t=f10366f4-42a0-5bf3-0a2a-6be221a21989&l=4644

swathipil commented 2 years ago

The error in test_session_by_servicebus_client_session_pool with Cannot open log for source 'Microsoft.ServiceBus' seems to be an error with the service. Similar issue was filed here : https://github.com/Azure/azure-sdk-for-net/issues/27067

For now, ignoring this error in the test.

EDIT: It looks like this error is happening in every test where .get_queue_receiver(...session_id=NEXT_AVAILABLE_SESSION) and seems to be after this call results in an OperationTimeoutError. For ex: https://github.com/Azure/azure-sdk-for-python/blob/a1deaf3ed7ea91c96377ad8e895facc624454126/sdk/servicebus/azure-servicebus/tests/test_sessions.py#L259

swathipil commented 2 years ago

nightly runs have been green for a week so closing

swathipil commented 2 years ago

more failures 3/7: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1413650&view=results

yunhaoling commented 2 years ago

success criteria: 90% pass rate for the past two weeks

swathipil commented 1 year ago

most flaky EH tests:

  assert single_cnt == 60

E assert 30 == 60 E +30 E -60


In general, only receiving half of expected events when using a ConsumerClient to receive, instead of receivers in the conftest fixture.