diff --git a/redis/reply_test.go b/redis/reply_test.go index 59bdba77..5ff3b5f0 100644 --- a/redis/reply_test.go +++ b/redis/reply_test.go @@ -19,7 +19,6 @@ import ( "math" "reflect" "strconv" - "strings" "testing" "time" @@ -227,17 +226,6 @@ func TestSlowLog(t *testing.T) { } } -// debugCheck skips t if err indicates that DEBUG is not allowed, -// otherwise it fails if err is not nil. -func debugCheck(t *testing.T, err error) { - t.Helper() - - if err != nil && strings.Contains(err.Error(), "ERR DEBUG command not allowed") { - t.Skip("DEBUG command not allowed") - } - require.NoError(t, err) -} - func TestLatency(t *testing.T) { c, err := dial() require.NoError(t, err) @@ -265,7 +253,7 @@ func TestLatency(t *testing.T) { // Sleep for 1ms to register a slow event. _, err = c.Do("DEBUG", "SLEEP", 0.001) - debugCheck(t, err) + require.NoError(t, err) result, err = c.Do("LATENCY", "LATEST") require.NoError(t, err) @@ -317,7 +305,7 @@ func TestLatencyHistories(t *testing.T) { // Sleep for 1ms to register a slow event _, err = c.Do("DEBUG", "SLEEP", 0.001) - debugCheck(t, err) + require.NoError(t, err) result, err = c.Do("LATENCY", "HISTORY", "command") require.NoError(t, err)