Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-DATAREDIS-1234-SNAPSHOT</version>

<name>Spring Data Redis</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,17 @@ public List<Long> lPos(byte[] key, byte[] element, @Nullable Integer rank, @Null
if (count != null) {
pipeline(connection.newLettuceResult(getAsyncConnection().lpos(key, element, count, args)));
} else {
pipeline(connection.newLettuceResult(getAsyncConnection().lpos(key, element, args)));
pipeline(
connection.newLettuceResult(getAsyncConnection().lpos(key, element, args), Collections::singletonList));
}
return null;
}
if (isQueueing()) {
if (count != null) {
transaction(connection.newLettuceResult(getAsyncConnection().lpos(key, element, count, args)));
} else {
transaction(connection.newLettuceResult(getAsyncConnection().lpos(key, element, args)));
transaction(
connection.newLettuceResult(getAsyncConnection().lpos(key, element, args), Collections::singletonList));
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class RedisTestProfileValueSource implements ProfileValueSource {
private static final String REDIS_32 = "3.2";
private static final String REDIS_50 = "5.0";
private static final String REDIS_60 = "6.0";
private static final String REDIS_606 = "6.0.6";
private static final String REDIS_VERSION_KEY = "redisVersion";

private static RedisTestProfileValueSource INSTANCE;
Expand Down Expand Up @@ -98,6 +99,10 @@ public String get(String key) {
return System.getProperty(key);
}

if (redisVersion.compareTo(RedisVersionUtils.parseVersion(REDIS_606)) >= 0) {
return REDIS_606;
}

if (redisVersion.compareTo(RedisVersionUtils.parseVersion(REDIS_60)) >= 0) {
return REDIS_60;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1501,9 +1501,9 @@ public void testLPushMultiple() {
public void lPos() {

actual.add(connection.rPush("mylist", "a", "b", "c", "1", "2", "3", "c", "c"));
actual.add(connection.lPos("mylist", "c"));
actual.add(connection.lPos("mylist", "c", null, null));

assertThat((Long) getResults().get(1)).isEqualTo(2);
assertThat((List<Long>) getResults().get(1)).containsOnly(2L);
}

@Test // DATAREDIS-1196
Expand Down