• YaacovHazan's avatar
    Stabilization and improvements around aof tests (#12626) · 2e0f6724
    YaacovHazan authored
    In some tests, the code manually searches for a log message, and it
    uses tail -1 with a delay of 1 second, which can miss the expected line.
    
    Also, because the aof tests use start_server_aof and not start_server,
    the test name doesn't log into the server log.
    
    To fix the above, I made the following changes:
    - Change the start_server_aof to wrap the start_server.
      This will add the created aof server to the servers list, and make
      srv() and wait_for_log_messages() available for the tests.
    
    - Introduce a new option for start_server.
      'wait_ready' - an option to let the caller start the test code without
      waiting for the server to be ready. useful for tests on a server that
      is expected to exit on startup.
    
    - Create a new start_server_aof_ex.
      The new proc also accept options as argument and make use of the
      new 'short_life' option for tests that are expected to exit on startup
      because of some error in the aof file(s).
    
    Because of the above, I had to change many lines and replace every
    local srv variable (a server config) usage with the srv().
    2e0f6724
server.tcl 25.4 KB