Skip to content

Commit

Permalink
Polishing #2467
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Aug 7, 2023
1 parent 312c874 commit 3c94de3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/RedisCommandBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ Command<String, String, Map<String, Object>> hello(int protocolVersion, String u
args.add(SETNAME).add(name);
}

return new Command<>(HELLO, TransformingOutput.transform(new ObjectOutput<>(StringCodec.ASCII), o -> o.map()), args);
return new Command<>(HELLO, new GenericMapOutput<>(StringCodec.ASCII), args);
}

Command<K, V, Boolean> hexists(K key, K field) {
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/io/lettuce/core/RedisHandshakeUnitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
*/
package io.lettuce.core;

import static org.assertj.core.api.Assertions.*;

import java.nio.ByteBuffer;
import java.util.Map;

import org.junit.jupiter.api.Test;

import io.lettuce.core.output.CommandOutput;
import io.lettuce.core.protocol.AsyncCommand;
import io.lettuce.core.protocol.ProtocolVersion;
import io.netty.channel.embedded.EmbeddedChannel;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.*;

/**
* Unit tests for {@link RedisHandshake}.
Expand Down Expand Up @@ -87,7 +88,7 @@ void handshakeWithDiscoveryShouldDowngrade() {

private static void helloResponse(CommandOutput<String, String, Map<String, String>> output) {

output.multi(8);
output.multiMap(8);
output.set(ByteBuffer.wrap("id".getBytes()));
output.set(1);

Expand Down

0 comments on commit 3c94de3

Please sign in to comment.