You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/02/28 22:01:00 UTC
[jira] [Commented] (GEODE-10049) Redis tests should include the entire error response message rather than just the error type
[ https://issues.apache.org/jira/browse/GEODE-10049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499195#comment-17499195 ]
ASF subversion and git services commented on GEODE-10049:
---------------------------------------------------------
Commit d9ef0f15892c1993756e5fef5ef33db3431dc449 in geode's branch refs/heads/develop from Donal Evans
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=d9ef0f1 ]
GEODE-10049: Check full Redis error message (#7362)
- Replace all uses of hasMessageContaining() with hasMessage() in Redis
tests that assert on the error message returned, with the exception of
CLIENT, CLUSTER and COMMAND, which return a more complex error message
- Return correct error messages for MSET and MSETNX with even
number of arguments
- Return correct error message for BITOP NOT when called with too many
arguments
- Simplify error message generation in UnknownExecutor
- Remove tests for behaviour with no longer existent internal commands
- For error responses that always use the same message (OOM, CROSSSLOT,
BUSYKEY, WRONGPASS, WRONGTYPE, NOAUTH) do not take a String argument in
RedisResponse
- Remove prefix-specific error generating methods from Coder in favour
of calling generic getErrorResponse()
- Remove isInstanceOf assertions on exception type returned by Jedis,
as it's something we have no control over
- Replace hard-coded error messages with references to constants
- Add missing error message assertions to a few tests
- Format error assertions to be single-line where possible
- Move error constants from SetEXExecutor to RedisConstants
- Return correct error for non-integer expiration argument in SETEX and
PSETEX
- Add tests for non-integer expiration argument for SETEX and PSETEX
- Add tests for non-integer expiration argument for SET with EX and PX
options
Authored-by: Donal Evans <do...@vmware.com>
> Redis tests should include the entire error response message rather than just the error type
> --------------------------------------------------------------------------------------------
>
> Key: GEODE-10049
> URL: https://issues.apache.org/jira/browse/GEODE-10049
> Project: Geode
> Issue Type: Test
> Components: redis
> Affects Versions: 1.16.0
> Reporter: Donal Evans
> Assignee: Donal Evans
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.16.0
>
>
> 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:
> {code:java}
> assertThatThrownBy(
> () -> jedis.hsetnx(string_key, field, "something else"))
> .isInstanceOf(JedisDataException.class)
> .hasMessageContaining("WRONGTYPE");{code}
> instead we should probably look for the full error message that native Redis puts out:
> {code:java}
> .hasMessage("WRONGTYPE Operation against a key holding the wrong kind of value"){code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)