-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#29770237 REMOVE MYSQLTEST "REAL_SLEEP" COMMAND
The mysqltest command "real_sleep" is an old artifact from early days of MySQL development, it no longer serves any purpose. SELECT * FROM t1; --sleep 3 SELECT * FROM T1 The intention was that one should be able write tests using the sleep command and if the machine is slow, pass --sleep with a higher value in order to increase the time slept during the test. This is not practical in an automated test environment like we have today. Using "mysqltest --sleep 1", the above sleep would be changed to 1 second and "mysqltest --sleep=10" would change it to 10 seconds. If there are more sleep commands in a test, they will all be changed to same value and hence, it doesn't scale. We have already changed all usage of sleep into loops and there are various include files to use to wait until certain condition has been fulfilled. This has made it possible to run our test suite on both slow and fast machines. The patch does the following :- - Removes the mysqltest "real_sleep" command. All instances of the command in the test suite are replaced with the "sleep" command. - Removes the "mysqltest --sleep" command line argument. - Removes the "mysql-test-run.pl --sleep" command line argument. - Changes the mysqltest "sleep" command to always wait as long as argument specified. - Updates the code comments for "do_sleep()" to indicate that fractional values can be used as a sleep value, not only whole seconds. i.e., sleep 0.1; - Updates the mysqltest documentation to delete all information about the removed command and options. It also clearly describes that the "sleep" command supports sleeping for intervals which are less than one second. Change-Id: I060d635aa3cbcb62323d1e5ea946264a44a56461
- Loading branch information
Srikanth B R
committed
Mar 3, 2020
1 parent
c164760
commit 686055c
Showing
33 changed files
with
130 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ while ($wait_counter) | |
} | ||
if ($error) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
dec $wait_counter; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ while ($wait_counter) | |
} | ||
if (!$success) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
dec $wait_counter; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ while ($wait_counter) | |
} | ||
if (!$success) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
dec $wait_counter; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ while ($wait_counter) | |
} | ||
if (!$success) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
dec $retry_counter; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ while ($wait_counter) | |
} | ||
if (!$success) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
dec $wait_counter; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ while ($wait_seconds) | |
} | ||
if (!$success_wait) | ||
{ | ||
real_sleep 0.1; | ||
sleep 0.1; | ||
} | ||
dec $repeat; | ||
} | ||
|
Oops, something went wrong.