1. 10 Sep, 2020 13 commits
    • Eran Liberty's avatar
      Allow exec with read commands on readonly replica in cluster (#7766) · 84ba2ec8
      Eran Liberty authored
      
      
      There was a bug. Although cluster replicas would allow read commands,
      they would not allow a MULTI-EXEC that's composed solely of read commands.
      Adds tests for coverage.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarEran Liberty <eranl@amazon.com>
      (cherry picked from commit b120366d)
      84ba2ec8
    • Oran Agra's avatar
      handle cur_test for nested tests · 643d3e0b
      Oran Agra authored
      if there are nested tests and nested servers, we need to restore the
      previous value of cur_test when a test exist.
      
      example:
      ```
      test{test 1} {
      	start_server {
      		test{test 1.1 - master only} {
      		}
      		start_server {
      		    test{test 1.2 - with replication} {
                  }
      		}
      	}
      }
      ```
      when `test 1.1 - master only exists`, we're still inside `test 1`
      
      (cherry picked from commit 0a1e7341)
      643d3e0b
    • bodong.ybd's avatar
      Tests: Some fixes for macOS · 781e50d4
      bodong.ybd authored
      1) cur_test: when restart_server, "no such variable" error occurs
        ./runtest --single integration/rdb
        test {client freed during loading}
            SET ::cur_test
            restart_server
              kill_server
                test "Check for memory leaks (pid $pid)"
                SET ::cur_test
                UNSET ::cur_test
            UNSET ::cur_test // This global variable has been unset.
      
      2) `ps --ppid` not available on macOS platform, can be replaced with
      `pgrep -P pid`.
      
      (cherry picked from commit f22fa959)
      781e50d4
    • Oran Agra's avatar
      Fix cluster consistency-check test (#7754) · 57dbd6e9
      Oran Agra authored
      This test was failing from time to time see discussion at the bottom of #7635
      This was probably due to timing, the DEBUG SLEEP executed by redis-cli
      didn't sleep for enough time.
      
      This commit changes:
      1) use SET-ACTIVE-EXPIRE instead of DEBUG SLEEP
      2) reduce many `after` sleeps with retry loops to speed up the test.
      3) add many comment explaining the different steps of the test and
         it's purpose.
      4) config appendonly before populating the volatile keys, so that they'll
         be part of the AOF command stream rather than the preamble RDB portion.
      
      other complications: recently kill_instance switched from SIGKILL to
      SIGTERM, and this would sometimes fail since there was an AOFRW running
      in the background. now we wait for it to end before attempting the kill.
      
      (cherry picked from commit b491d477)
      57dbd6e9
    • Yossi Gottlieb's avatar
      Tests: fix unmonitored servers. (#7756) · e9fef49e
      Yossi Gottlieb authored
      There is an inherent race condition in port allocation for spawned
      servers. If a server fails to start because a port is taken, a new port
      is allocated. This fixes a problem where the logs are not truncated and
      as a result a large number of unmonitored servers are started.
      
      (cherry picked from commit 2df4cb93)
      e9fef49e
    • Oran Agra's avatar
      fix broken cluster/sentinel tests by recent commit (#7752) · a227bc80
      Oran Agra authored
      2b998de4 added a file for stderr to keep valgrind log but i forgot to
      add a similar thing when valgrind isn't being used.
      the result is that `glob */err.txt` fails.
      
      (cherry picked from commit 42ba7a1b)
      a227bc80
    • Oran Agra's avatar
      Improve valgrind support for cluster tests (#7725) · d410dc31
      Oran Agra authored
      - redirect valgrind reports to a dedicated file rather than console
      - try to avoid killing instances with SIGKILL so that we get the memory
        leak report (killing with SIGTERM before resorting to SIGKILL)
      - search for valgrind reports when done, print them and fail the tests
      - add --dont-clean option to keep the logs on exit
      - fix exit error code when crash is found (would have exited with 0)
      
      changes that affect the normal redis test suite:
      - refactor check_valgrind_errors into two functions one to search and
        one to report
      - move the search half into util.tcl to serve the cluster tests too
      - ignore "address range perms" valgrind warnings which seem non relevant.
      
      (cherry picked from commit 2b998de4)
      d410dc31
    • Oran Agra's avatar
      test infra - add durable mode to work around test suite crashing · 41c7c791
      Oran Agra authored
      in some cases a command that returns an error possibly due to a timing
      issue causes the tcl code to crash and thus prevents the rest of the
      tests from running. this adds an option to make the test proceed despite
      the crash.
      maybe it should be the default mode some day.
      
      (cherry picked from commit fe5da2e6)
      41c7c791
    • Oran Agra's avatar
      test infra - wait_done_loading · db6c763d
      Oran Agra authored
      reduce code duplication in aof.tcl.
      move creation of clients into the test so that it can be skipped
      
      (cherry picked from commit 1b7ba44e)
      db6c763d
    • Oran Agra's avatar
      test infra - flushall between tests in external mode · 72d6f966
      Oran Agra authored
      (cherry picked from commit b65e5aca)
      72d6f966
    • Oran Agra's avatar
      test infra - improve test skipping ability · 28e07460
      Oran Agra authored
      - skip full units
      - skip a single test (not just a list of tests)
      - when skipping tag, skip spinning up servers, not just the tests
      - skip tags when running against an external server too
      - allow using multiple tags (split them)
      
      (cherry picked from commit 677d14c2)
      28e07460
    • Oran Agra's avatar
      test infra - reduce disk space usage · 5b8de5b7
      Oran Agra authored
      this is important when running a test with --loop
      
      (cherry picked from commit e3e69c25)
      5b8de5b7
    • Oran Agra's avatar
      test infra - write test name to logfile · bce350c6
      Oran Agra authored
      (cherry picked from commit 9d527d07)
      bce350c6
  2. 01 Sep, 2020 20 commits
  3. 20 Jul, 2020 7 commits