1. 06 Oct, 2021 1 commit
  2. 09 Jun, 2021 1 commit
    • Yossi Gottlieb's avatar
      Improve test suite to handle external servers better. (#9033) · 8a86bca5
      Yossi Gottlieb authored
      This commit revives the improves the ability to run the test suite against
      external servers, instead of launching and managing `redis-server` processes as
      part of the test fixture.
      
      This capability existed in the past, using the `--host` and `--port` options.
      However, it was quite limited and mostly useful when running a specific tests.
      Attempting to run larger chunks of the test suite experienced many issues:
      
      * Many tests depend on being able to start and control `redis-server` themselves,
      and there's no clear distinction between external server compatible and other
      tests.
      * Cluster mode is not supported (resulting with `CROSSSLOT` errors).
      
      This PR cleans up many things and makes it possible to run the entire test suite
      against an external server. It also provides more fine grained controls to
      handle cases where the external server supports a subset of the Redis commands,
      limited number of databases, cluster mode, etc.
      
      The tests directory now contains a `README.md` file that describes how this
      works.
      
      This commit also includes additional cleanups and fixes:
      
      * Tests can now be tagged.
      * Tag-based selection is now unified across `start_server`, `tags` and `test`.
      * More information is provided about skipped or ignored tests.
      * Repeated patterns in tests have been extracted to common procedures, both at a
        global level and on a per-test file basis.
      * Cleaned up some cases where test setup was based on a previous test executing
        (a major anti-pattern that repeats itself in many places).
      * Cleaned up some cases where test teardown was not part of a test (in the
        future we should have dedicated teardown code that executes even when tests
        fail).
      * Fixed some tests that were flaky running on external servers.
      8a86bca5
  3. 19 May, 2021 1 commit
  4. 24 Mar, 2021 1 commit
  5. 08 Mar, 2021 1 commit
  6. 15 Feb, 2021 1 commit
    • Oran Agra's avatar
      minor test suite cleanup, revive old test (#8497) · fb3457d1
      Oran Agra authored
      There are two tests in other.tcl that were dependant of the sha1 package
      import which meant that they didn't usually run.
      The reason it was like that was that prior to the creation of DEBUG
      DIGEST, the test suite used to have an equivalent function, but that's
      no longer the case and this dependency isn't needed.
      
      The other change is to revert config changes done by the test before the
      test suite continues. can be useful if using `--host` to run multiple
      units against the same server
      fb3457d1
  7. 28 Jan, 2021 1 commit
  8. 06 Dec, 2020 1 commit
    • Wang Yuan's avatar
      Limit the main db and expires dictionaries to expand (#7954) · 75f9dec6
      Wang Yuan authored
      As we know, redis may reject user's requests or evict some keys if
      used memory is over maxmemory. Dictionaries expanding may make
      things worse, some big dictionaries, such as main db and expires dict,
      may eat huge memory at once for allocating a new big hash table and be
      far more than maxmemory after expanding.
      There are related issues: #4213 #4583
      
      More details, when expand dict in redis, we will allocate a new big
      ht[1] that generally is double of ht[0], The size of ht[1] will be
      very big if ht[0] already is big. For db dict, if we have more than
      64 million keys, we need to cost 1GB for ht[1] when dict expands.
      
      If the sum of used memory and new hash table of dict needed exceeds
      maxmemory, we shouldn't allow the dict to expand. Because, if we
      enable keys eviction, we still couldn't add much more keys after
      eviction and rehashing, what's worse, redis will keep less keys when
      redis only remains a little memory for storing new hash table instead
      of users' data. Moreover users can't write data in redis if disable
      keys eviction.
      
      What this commit changed ?
      
      Add a new member function expandAllowed for dict type, it provide a way
      for caller to allow expand or not. We expose two parameters for this
      function: more memory needed for expanding and dict current load factor,
      users can implement a function to make a decision by them.
      For main db dict and expires dict type, these dictionaries may be very
      big and cost huge memory for expanding, so we implement a judgement
      function: we can stop dict to expand provisionally if used memory will
      be over maxmemory after dict expands, but to guarantee the performance
      of redis, we still allow dict to expand if dict load factor exceeds the
      safe load factor.
      Add test cases to verify we don't allow main db to expand when left
      memory is not enough, so that avoid keys eviction.
      
      Other changes:
      
      For new hash table size when expand. Before this commit, the size is
      that double used of dict and later _dictNextPower. Actually we aim to
      control a dict load factor between 0.5 and 1.0. Now we replace *2 with
      +1, since the first check is that used >= size, the outcome of before
      will usually be the same as _dictNextPower(used+1). The only case where
      it'll differ is when dict_can_resize is false during fork, so that later
      the _dictNextPower(used*2) will cause the dict to jump to *4 (i.e.
      _dictNextPower(1025*2) will return 4096).
      Fix rehash test cases due to changing algorithm of new hash table size
      when expand.
      75f9dec6
  9. 05 Nov, 2020 1 commit
    • Yossi Gottlieb's avatar
      Add RESET command. (#7982) · 1fd456f9
      Yossi Gottlieb authored
      
      
      Perform full reset of all client connection states, is if the client was
      disconnected and re-connected. This affects:
      
      * MULTI state
      * Watched keys
      * MONITOR mode
      * Pub/Sub subscription
      * ACL/Authenticated state
      * Client tracking state
      * Cluster read-only/asking state
      * RESP version (reset to 2)
      * Selected database
      * CLIENT REPLY state
      
      The response is +RESET to make it easily distinguishable from other
      responses.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarItamar Haber <itamar@redislabs.com>
      1fd456f9
  10. 03 Nov, 2020 1 commit
  11. 26 May, 2020 1 commit
    • Oran Agra's avatar
      tests: each test client work on a distinct port range · e258a1c0
      Oran Agra authored
      apparently when running tests in parallel (the default of --clients 16),
      there's a chance for two tests to use the same port.
      specifically, one test might shutdown a master and still have the
      replica up, and then another test will re-use the port number of master
      for another master, and then that replica will connect to the master of
      the other test.
      
      this can cause a master to count too many full syncs and fail a test if
      we run the tests with --single integration/psync2 --loop --stop
      
      see Probmem 2 in #7314
      e258a1c0
  12. 07 Oct, 2019 1 commit
    • Yossi Gottlieb's avatar
      TLS: Connections refactoring and TLS support. · b087dd1d
      Yossi Gottlieb authored
      * Introduce a connection abstraction layer for all socket operations and
      integrate it across the code base.
      * Provide an optional TLS connections implementation based on OpenSSL.
      * Pull a newer version of hiredis with TLS support.
      * Tests, redis-cli updates for TLS support.
      b087dd1d
  13. 25 Mar, 2018 1 commit
  14. 14 Oct, 2016 1 commit
  15. 25 Apr, 2016 1 commit
  16. 22 Nov, 2012 1 commit
  17. 26 Jan, 2012 1 commit
  18. 21 Dec, 2011 1 commit
  19. 11 Nov, 2011 1 commit
  20. 11 Jul, 2011 4 commits
  21. 10 Jul, 2011 1 commit
  22. 23 Feb, 2011 1 commit
  23. 09 Jan, 2011 3 commits
  24. 14 Dec, 2010 1 commit
  25. 15 Oct, 2010 1 commit
  26. 31 Aug, 2010 1 commit
  27. 27 Jul, 2010 2 commits
  28. 02 Jun, 2010 2 commits
  29. 27 May, 2010 1 commit
  30. 14 May, 2010 3 commits