Skip to content

Commit

Permalink
DATAREDIS-1196 - Guard Tests that require Redis 6.0.6+
Browse files Browse the repository at this point in the history
  • Loading branch information
christophstrobl committed Sep 16, 2020
1 parent d8754ad commit 97b5acf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -37,6 +38,8 @@
import org.springframework.data.redis.RedisTestProfileValueSource;
import org.springframework.data.redis.StringObjectFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.test.util.MinimumRedisVersionRule;
import org.springframework.test.annotation.IfProfileValue;

/**
* Integration test of {@link DefaultListOperations}
Expand All @@ -50,6 +53,8 @@
@RunWith(Parameterized.class)
public class DefaultListOperationsTests<K, V> {

@Rule public MinimumRedisVersionRule redisVersion = new MinimumRedisVersionRule();

private RedisTemplate<K, V> redisTemplate;

private ObjectFactory<K> keyFactory;
Expand Down Expand Up @@ -316,6 +321,7 @@ public void leftPushAllShouldThrowExceptionWhenCalledWithNull() {
}

@Test // DATAREDIS-1196
@IfProfileValue(name = "redisVersion", value = "6.0.6+")
public void indexOf() {

K key = keyFactory.instance();
Expand All @@ -330,6 +336,7 @@ public void indexOf() {
}

@Test // DATAREDIS-1196
@IfProfileValue(name = "redisVersion", value = "6.0.6+")
@Ignore("https://github.com/lettuce-io/lettuce-core/issues/1410")
public void lastIndexOf() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@
import org.assertj.core.api.Assumptions;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.data.redis.ObjectFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.test.util.MinimumRedisVersionRule;
import org.springframework.test.annotation.IfProfileValue;

/**
* Integration test for RedisList
Expand All @@ -40,6 +43,8 @@
*/
public abstract class AbstractRedisListTests<T> extends AbstractRedisCollectionTests<T> {

@Rule public MinimumRedisVersionRule redisVersion = new MinimumRedisVersionRule();

protected RedisList<T> list;

/**
Expand Down Expand Up @@ -161,6 +166,7 @@ public void addAllIndexCollectionMiddle() {
}

@Test // DATAREDIS-1196
@IfProfileValue(name = "redisVersion", value = "6.0.6+")
public void testIndexOfObject() {

Assumptions.assumeThat(template.getConnectionFactory()).isInstanceOf(LettuceConnectionFactory.class);
Expand Down Expand Up @@ -527,6 +533,7 @@ public void testTakeLast() {
}

@Test // DATAREDIS-1196
@IfProfileValue(name = "redisVersion", value = "6.0.6+")
@Ignore("https://github.com/lettuce-io/lettuce-core/issues/1410")
public void lastIndexOf() {

Expand Down

0 comments on commit 97b5acf

Please sign in to comment.