-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Service Bus] reduce livetest time #18176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -209,7 +209,7 @@ async def test_github_issue_6178_async(self, servicebus_namespace_connection_str | |
| @pytest.mark.live_test_only | ||
| @CachedResourceGroupPreparer(name_prefix='servicebustest') | ||
| @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') | ||
| @ServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) | ||
| @ServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True, lock_duration='PT10S') | ||
| async def test_async_queue_by_queue_client_conn_str_receive_handler_receiveanddelete(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): | ||
| async with ServiceBusClient.from_connection_string( | ||
| servicebus_namespace_connection_string, logging_enable=False) as sb_client: | ||
|
|
@@ -231,7 +231,7 @@ async def test_async_queue_by_queue_client_conn_str_receive_handler_receiveandde | |
|
|
||
| assert not receiver._running | ||
| assert len(messages) == 10 | ||
| time.sleep(30) | ||
| time.sleep(10) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we ensure this will not increase the number of transient failures? same question for all similar changes
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a good point. I'm not sure that this won't increase transient failures. Do you know what the best way to check that would be?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rakshith91 thanks for being thoughtful! as far as I could remember, the transient failures are usually caused by tests including receiving which doesn't wait long enough. I think we could merge the PR first and see how it goes, if we keep observing failures, then we fix them :P
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good to me! |
||
|
|
||
| messages = [] | ||
| async with sb_client.get_queue_receiver(servicebus_queue.name, receive_mode=ServiceBusReceiveMode.RECEIVE_AND_DELETE, max_wait_time=5) as receiver: | ||
|
|
@@ -896,10 +896,10 @@ async def test_async_queue_message_time_to_live(self, servicebus_namespace_conne | |
| content = str(uuid.uuid4()) | ||
| message_id = uuid.uuid4() | ||
| message = ServiceBusMessage(content) | ||
| message.time_to_live = timedelta(seconds=30) | ||
| message.time_to_live = timedelta(seconds=15) | ||
| await sender.send_messages(message) | ||
|
|
||
| time.sleep(30) | ||
| time.sleep(15) | ||
| async with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: | ||
| messages = await receiver.receive_messages(max_wait_time=10) | ||
| assert not messages | ||
|
|
@@ -1026,7 +1026,7 @@ async def test_async_queue_message_lock_renew(self, servicebus_namespace_connect | |
| @pytest.mark.live_test_only | ||
| @CachedResourceGroupPreparer(name_prefix='servicebustest') | ||
| @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') | ||
| @ServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) | ||
| @ServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True, lock_duration='PT10S') | ||
| async def test_async_queue_message_receive_and_delete(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): | ||
| async with ServiceBusClient.from_connection_string( | ||
| servicebus_namespace_connection_string, logging_enable=False) as sb_client: | ||
|
|
@@ -1051,7 +1051,7 @@ async def test_async_queue_message_receive_and_delete(self, servicebus_namespace | |
| with pytest.raises(ValueError): | ||
| await receiver.renew_message_lock(message) | ||
|
|
||
| time.sleep(30) | ||
| time.sleep(10) | ||
| async with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: | ||
| messages = await receiver.receive_messages(max_wait_time=10) | ||
| for m in messages: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.