Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
thachlp committed Jun 22, 2024
1 parent 8fdbd97 commit a1ab7ef
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import io.lettuce.core.cluster.ClusterReadOnlyCommands;
import io.lettuce.core.protocol.ProtocolKeyword;
import io.lettuce.test.condition.RedisConditions;
import org.assertj.core.util.Arrays;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -615,13 +614,13 @@ private boolean isCommandReadOnly(String commandName) {
throw new IllegalArgumentException("Command not found: " + commandName);
}

List<CommandDetail> details = CommandDetailParser.parse(Arrays.asList(commandInfo));
List<CommandDetail> details = CommandDetailParser.parse(commandInfo);
if (details.isEmpty()) {
throw new IllegalArgumentException("Command details could not be parsed: " + commandName);
}

CommandDetail detail = details.get(0);
return detail.getFlags().contains(CommandDetail.Flag.READONLY) && !detail.getFlags().contains(CommandDetail.Flag.WRITE);
return !detail.getFlags().contains(CommandDetail.Flag.WRITE);
}

}

0 comments on commit a1ab7ef

Please sign in to comment.