Skip to content

Commit

Permalink
chore: update code, re-trigger ci run
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Mar 21, 2024
1 parent 9ef304f commit 754b628
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,21 @@ protected CacheResult do_PUT(K key, V value, long expireAfterWrite, TimeUnit tim
@Override
protected CacheResult do_PUT_ALL(Map<? extends K, ? extends V> map, long expireAfterWrite, TimeUnit timeUnit) {
StringBinaryCommands commands = null;
Connection connection = null;
Closeable closeable = null;
try {
commands = (StringBinaryCommands) writeCommands();
int failCount = 0;
List<Response<String>> responses = new ArrayList<>();
StringPipelineBinaryCommands pipeline;
if (commands instanceof JedisPooled) {
connection = ((JedisPooled) commands).getPool().getResource();
Connection connection = ((JedisPooled) commands).getPool().getResource();
closeable = connection;
pipeline = new Pipeline(connection);
} else if (commands instanceof JedisClusterWrapper) {
JedisClusterWrapper cluster = (JedisClusterWrapper) commands;
pipeline = cluster.getPipeline();
ClusterPipeline clusterPipeline = cluster.getPipeline();
pipeline = clusterPipeline;
closeable = clusterPipeline;
} else if (commands instanceof Jedis) {
pipeline = new Pipeline((Jedis) commands);
} else {
Expand All @@ -304,7 +307,6 @@ protected CacheResult do_PUT_ALL(Map<? extends K, ? extends V> map, long expireA
((Pipeline) pipeline).sync();
} else if (pipeline instanceof ClusterPipeline) {
((ClusterPipeline) pipeline).sync();
((ClusterPipeline) pipeline).close();
} else {
throw new UnsupportedOperationException("unrecognized pipeline type");
}
Expand All @@ -320,7 +322,7 @@ protected CacheResult do_PUT_ALL(Map<? extends K, ? extends V> map, long expireA
return new CacheResult(ex);
} finally {
closeJedis(commands);
close(connection);
close(closeable);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ protected void lockTest() throws Exception {
try (AutoReleaseLock lock = cache.tryLock("LockKeyAndRunKey", 1, TimeUnit.SECONDS)) {
Assert.assertNotNull(lock);
}
;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.lettuce.core.masterslave.MasterSlave;
import io.lettuce.core.masterslave.StatefulRedisMasterSlaveConnection;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import java.util.Arrays;
Expand Down

0 comments on commit 754b628

Please sign in to comment.