Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10049

Redis tests should include the entire error response message rather than just the error type

    XMLWordPrintableJSON

Details

    Description

      Currently many tests look for substrings of error messages, rather than the error message as a whole. This has in the past led to cases where the Geode for Redis Module's error messages have not precisely matched those of native Redis.

      For example, if the test is:

      assertThatThrownBy(
              () -> jedis.hsetnx(string_key, field, "something else"))
                  .isInstanceOf(JedisDataException.class)
                  .hasMessageContaining("WRONGTYPE");

      instead we should probably look for the full error message that native Redis puts out:

      .hasMessage("WRONGTYPE Operation against a key holding the wrong kind of value")

      Attachments

        Issue Links

          Activity

            People

              donalevans Donal Evans
              donalevans Donal Evans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: