Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensive tests for UnifiedJedis #3788

Merged
merged 11 commits into from
Apr 3, 2024

Commits on Mar 25, 2024

  1. Align Pipelined commands with UnifiedJedis

    Add some Pipelined commands that are available in UnifiedJedis but are
    missing the pipelined version.
    gerzse committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    6c8d14d View commit details
    Browse the repository at this point in the history
  2. Add extensive tests for UnifiedJedis

    Add mocked tests for UnifiedJedis. Most of the code is covered, except
    the constructors and some iterator methods. Those are left for later.
    
    Take the opportunity to split PipeliningTests into smaller test classes.
    The idea is to have one superclass (MockCommandObjectsTest) that exposes
    a variety of mocked CommandObjects. From there we branch in two
    directions: towards PipeliningBase and towards UnifiedJedis. Each has a
    test superclass that prepares mocked instances, and a set of concrete
    test classes that contain the actual tests.
    
    The tests are grouped in categories. The names of the categories are the
    same as used on the redis.io website in the commands documentation page.
    Inside each section (i.e. test class), the tested commands are ordered
    alphabetically. The tests run in pairs, one for the string-based
    command, and one for the equivalent byte-array-based command. Hopefully
    this gives a good structure for following the code.
    
    A new public constructor is needed in UnifiedJedis, in order to inject
    the mocks.
    
    Also, due to method visibility, one test class for UnifiedJedis must
    reside in the same package as the class itself.
    gerzse committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    6e3d40c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c4a679 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c142c1c View commit details
    Browse the repository at this point in the history
  5. Undo script commands changes

    gerzse committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3365ec3 View commit details
    Browse the repository at this point in the history
  6. Remove tests for removed code

    gerzse committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    72dd39b View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Configuration menu
    Copy the full SHA
    dd0088f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    acf0cb2 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    5171f7a View commit details
    Browse the repository at this point in the history
  2. React to code review

    Rename classes as suggested. Move some tests into better suited classed.
    Remove everything Graph related.
    gerzse committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    db387ef View commit details
    Browse the repository at this point in the history
  3. Fix unit tests

    And add two tests for recently added code.
    gerzse committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    03f2745 View commit details
    Browse the repository at this point in the history