-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
{CI} Fix top N slowest Test #21880
{CI} Fix top N slowest Test #21880
Conversation
CI |
93f68e9
to
ced4800
Compare
ced4800
to
92e4524
Compare
@@ -1326,7 +1326,7 @@ def _create_db_wait_for_first_backup(test, resource_group, server, database_name | |||
# Wait until earliestRestoreDate is in the past. When run live, this will take at least | |||
# 10 minutes. Unforunately there's no way to speed this up | |||
while db['earliestRestoreDate'] is None: | |||
sleep(60) | |||
time.sleep(60) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from time import sleep
can now be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need modify these codes before remove from time import sleep
.
I think add if self.is_live
condition is also acceptable.
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 1125 to 1126 in 92e4524
if self.is_live: | |
sleep(120) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 1454 to 1456 in 92e4524
if self.is_live: | |
self.assertTrue(datetime.now() < start_time + timeout, 'Deleted db not found before timeout expired.') | |
sleep(10) # seconds |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 2743 to 2744 in 92e4524
if self.is_live: | |
sleep(120) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 2764 to 2765 in 92e4524
if self.is_live: | |
sleep(60) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 2777 to 2778 in 92e4524
if self.is_live: | |
sleep(60) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 4481 to 4482 in 92e4524
if self.is_live: | |
sleep(120) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 4594 to 4595 in 92e4524
if self.is_live: | |
sleep(120) |
azure-cli/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Lines 4607 to 4608 in 92e4524
if self.is_live: | |
sleep(120) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's only remove from time import sleep
when it is not used.
Description
This PR will speed up our test.
Our list command is not pagination, it will get all the data.
That is why some recording files are very large.
And in test_show_built_in_policy, we choose to check the first resource instead of check all the resource to speed up.
We only mock time.sleep in azure-sdk-tools.
That's why if someone use sleep(xxx), it will not work.
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/patches.py
Line 13 in 30216d0
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.