Skip to content
  • Srikanth B R's avatar
    686055c2
    Bug#29770237 REMOVE MYSQLTEST "REAL_SLEEP" COMMAND · 686055c2
    Srikanth B R authored
    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
    686055c2
    Bug#29770237 REMOVE MYSQLTEST "REAL_SLEEP" COMMAND
    Srikanth B R authored
    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