GEODE-8638: Match the way Redis 5.x handles HELLO (#5650)
diff --git a/geode-redis/README.md b/geode-redis/README.md
index cdd9bc3..87d7413 100644
--- a/geode-redis/README.md
+++ b/geode-redis/README.md
@@ -120,7 +120,7 @@
As a lot of data in memory will be lost, including possibly events in queues, do you really want to shutdown the entire distributed system? (Y/n)
```
-To confirm that everything shutdown correctly, if you try and execute a Redis command in the redis-cli you should see the following message:
+To confirm that everything shutdown correctly, if you execute a Redis command in the redis-cli you should see the following message:
```commandline
Could not connect to Redis at 127.0.0.1:6379: Connection refused
@@ -231,7 +231,6 @@
| | | GEOPOS |
| | | GEORADIUS |
| | | GEORADIUSBYMEMBER |
-| | | HELLO |
| | | HSTRLEN |
| | | INFO |
| | | LASTSAVE |
diff --git a/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java b/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java
index e6fd485..33b6979 100644
--- a/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java
+++ b/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java
@@ -58,7 +58,12 @@
@Test
public void givenUnknownCommand_withEmptyStringArgument_returnsUnknownCommandErrorWithArgumentsListed() {
assertThatThrownBy(() -> jedis.sendCommand("fhqwhgads"::getBytes, "EVERYBODY", ""))
- .hasMessage(
- "ERR unknown command `fhqwhgads`, with args beginning with: `EVERYBODY`, ``, ");
+ .hasMessage("ERR unknown command `fhqwhgads`, with args beginning with: `EVERYBODY`, ``, ");
+ }
+
+ @Test // HELLO is not a recognized command until Redis 6.0.0
+ public void givenHelloCommand_returnsUnknownCommandErrorWithArgumentsListed() {
+ assertThatThrownBy(() -> jedis.sendCommand("HELLO"::getBytes))
+ .hasMessage("ERR unknown command `HELLO`, with args beginning with: ");
}
}
diff --git a/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java b/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
index dbd6610..61adea4 100755
--- a/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
+++ b/geode-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
@@ -291,7 +291,6 @@
GEODIST(null, UNIMPLEMENTED),
GEORADIUS(null, UNIMPLEMENTED),
GEORADIUSBYMEMBER(null, UNIMPLEMENTED),
- HELLO(null, UNIMPLEMENTED),
LATENCY(null, UNIMPLEMENTED),
LASTSAVE(null, UNIMPLEMENTED),
LINDEX(null, UNIMPLEMENTED),
diff --git a/geode-redis/src/test/java/org/apache/geode/redis/internal/SupportedCommandsJUnitTest.java b/geode-redis/src/test/java/org/apache/geode/redis/internal/SupportedCommandsJUnitTest.java
index 4ee20ad..7bb0a24 100644
--- a/geode-redis/src/test/java/org/apache/geode/redis/internal/SupportedCommandsJUnitTest.java
+++ b/geode-redis/src/test/java/org/apache/geode/redis/internal/SupportedCommandsJUnitTest.java
@@ -143,7 +143,6 @@
"GEODIST",
"GEORADIUS",
"GEORADIUSBYMEMBER",
- "HELLO",
"LATENCY",
"LASTSAVE",
"LINDEX",