DATAREDIS-563 - Migrate ticket references in test code to Spring Framework style.

This commit is contained in:
Mark Paluch
2017-01-11 14:53:13 +01:00
parent 2b93ca3dfe
commit 154f74c408
113 changed files with 1713 additions and 6306 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,10 +103,7 @@ public class RedisCacheManagerTransactionalUnitTests {
}
}
/**
* @see DATAREDIS-375
*/
@Test
@Test // DATAREDIS-375
public void testCacheIsNotDecoratedTwiceWithTransactionAwareCacheDecorator() {
Cache cache = cacheManager.getCache(cacheName);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,38 +68,26 @@ public class RedisCacheManagerUnitTests {
cacheManager.afterPropertiesSet();
}
/**
* @see DATAREDIS-246
*/
@Test
@Test // DATAREDIS-246
public void testGetCacheReturnsNewCacheWhenRequestedCacheIsNotAvailable() {
Cache cache = cacheManager.getCache("not-available");
assertThat(cache, notNullValue());
}
/**
* @see DATAREDIS-246
*/
@Test
@Test // DATAREDIS-246
public void testGetCacheReturnsExistingCacheWhenRequested() {
Cache cache = cacheManager.getCache("cache");
assertThat(cacheManager.getCache("cache"), sameInstance(cache));
}
/**
* @see DATAREDIS-246
*/
@Test
@Test // DATAREDIS-246
public void testCacheInitSouldNotRequestRemoteKeysByDefault() {
Mockito.verifyZeroInteractions(redisConnectionMock);
}
/**
* @see DATAREDIS-246
*/
@Test
@Test // DATAREDIS-246
public void testCacheInitShouldFetchAllCacheKeysWhenLoadingRemoteCachesOnStartupIsEnabled() {
cacheManager = new RedisCacheManager(redisTemplate);
@@ -111,11 +99,8 @@ public class RedisCacheManagerUnitTests {
assertThat(redisTemplate.getKeySerializer().deserialize(captor.getValue()).toString(), is("*~keys"));
}
/**
* @see DATAREDIS-246
*/
@SuppressWarnings("unchecked")
@Test
@Test // DATAREDIS-246
public void testCacheInitShouldInitializeRemoteCachesCorrectlyWhenLoadingRemoteCachesOnStartupIsEnabled() {
Set<byte[]> keys = new HashSet<byte[]>(Arrays.asList(redisTemplate.getKeySerializer()
@@ -129,10 +114,7 @@ public class RedisCacheManagerUnitTests {
assertThat(cacheManager.getCacheNames(), IsCollectionContaining.hasItem("remote-cache"));
}
/**
* @see DATAREDIS-246
*/
@Test
@Test // DATAREDIS-246
public void testCacheInitShouldNotInitialzeCachesWhenLoadingRemoteCachesOnStartupIsEnabledAndNoCachesAvailableOnRemoteServer() {
when(redisConnectionMock.keys(any(byte[].class))).thenReturn(Collections.<byte[]> emptySet());
@@ -184,10 +166,7 @@ public class RedisCacheManagerUnitTests {
assertThat(cacheManager.getCache("redis"), notNullValue());
}
/**
* @see DATAREDIS-283
*/
@Test
@Test // DATAREDIS-283
public void testRetainConfiguredCachesAfterBeanInitialization() {
cacheManager = new RedisCacheManager(redisTemplate);
@@ -198,10 +177,7 @@ public class RedisCacheManagerUnitTests {
assertThat(cacheManager.getCache("data"), notNullValue());
}
/**
* @see DATAREDIS-283
*/
@Test
@Test // DATAREDIS-283
public void testRetainConfiguredCachesAfterBeanInitializationWithLoadingOfRemoteKeys() {
Set<byte[]> keys = new HashSet<byte[]>(Arrays.asList(redisTemplate.getKeySerializer()

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -228,10 +228,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertFalse(monitorStateException.get());
}
/**
* @see DATAREDIS-243
*/
@Test
@Test // DATAREDIS-243
public void testCacheGetShouldReturnCachedInstance() {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -242,10 +239,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(value, isEqual(((RedisCache) cache).get(key, Object.class)));
}
/**
* @see DATAREDIS-243
*/
@Test
@Test // DATAREDIS-243
public void testCacheGetShouldRetunInstanceOfCorrectType() {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -257,10 +251,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(redisCache.get(key, value.getClass()), instanceOf(value.getClass()));
}
/**
* @see DATAREDIS-243
*/
@Test(expected = ClassCastException.class)
@Test(expected = ClassCastException.class) // DATAREDIS-243
public void testCacheGetShouldThrowExceptionOnInvalidType() {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -273,10 +264,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
Cache retrievedObject = redisCache.get(key, Cache.class);
}
/**
* @see DATAREDIS-243
*/
@Test
@Test // DATAREDIS-243
public void testCacheGetShouldReturnNullIfNoCachedValueFound() {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -290,11 +278,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(redisCache.get(invalidKey, value.getClass()), nullValue());
}
/**
* @see DATAREDIS-344
* @see DATAREDIS-416
*/
@Test
@Test // DATAREDIS-344, DATAREDIS-416
public void putIfAbsentShouldSetValueOnlyIfNotPresent() {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -317,10 +301,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(wrapper.get(), equalTo(value));
}
/**
* @see DATAREDIS-510
*/
@Test
@Test // DATAREDIS-510
public void cachePutWithNullShouldNotAddStuffToRedis() {
assumeThat(getAllowCacheNullValues(), is(false));
@@ -333,10 +314,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(cache.get(key), is(nullValue()));
}
/**
* @see DATAREDIS-510
*/
@Test
@Test // DATAREDIS-510
public void cachePutWithNullShouldRemoveKeyIfExists() {
assumeThat(getAllowCacheNullValues(), is(false));
@@ -353,11 +331,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(cache.get(key), is(nullValue()));
}
/**
* @see DATAREDIS-443
* @see DATAREDIS-452
*/
@Test
@Test // DATAREDIS-443, DATAREDIS-452
public void testCacheGetSynchronized() throws Throwable {
assumeThat(cache, instanceOf(RedisCache.class));
@@ -366,10 +340,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
runOnce(new CacheGetWithValueLoaderIsThreadSafe((RedisCache) cache));
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
public void cachePutWithNullShouldAddStuffToRedisWhenCachingNullIsEnabled() {
assumeThat(getAllowCacheNullValues(), is(true));
@@ -382,10 +353,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(cache.get(key, String.class), is(nullValue()));
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
public void testCacheGetSynchronizedNullAllowingNull() {
assumeThat(getAllowCacheNullValues(), is(true));
@@ -403,10 +371,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(cache.get(key).get(), is(nullValue()));
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
public void testCacheGetSynchronizedNullNotAllowingNull() {
assumeThat(getAllowCacheNullValues(), is(false));
@@ -425,10 +390,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertThat(cache.get(key), is(nullValue()));
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
public void testCacheGetSynchronizedNullWithStoredNull() {
assumeThat(getAllowCacheNullValues(), is(true));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,10 +95,7 @@ public class RedisCacheUnitTests {
when(valueSerializerMock.deserialize(eq(VALUE_BYTES))).thenReturn(VALUE);
}
/**
* @see DATAREDIS-369
*/
@Test
@Test // DATAREDIS-369
public void putShouldNotKeepTrackOfKnownKeysWhenPrefixIsSet() {
cache = new RedisCache(CACHE_NAME, PREFIX_BYTES, templateSpy, EXPIRATION);
@@ -109,10 +106,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, never()).zAdd(eq(KNOWN_KEYS_SET_NAME_BYTES), eq(0D), any(byte[].class));
}
/**
* @see DATAREDIS-369
*/
@Test
@Test // DATAREDIS-369
public void putShouldKeepTrackOfKnownKeysWhenNoPrefixIsSet() {
cache = new RedisCache(CACHE_NAME, NO_PREFIX_BYTES, templateSpy, EXPIRATION);
@@ -123,10 +117,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, times(1)).zAdd(eq(KNOWN_KEYS_SET_NAME_BYTES), eq(0D), eq(KEY_BYTES));
}
/**
* @see DATAREDIS-369
*/
@Test
@Test // DATAREDIS-369
public void clearShouldRemoveKeysUsingKnownKeysWhenNoPrefixIsSet() {
cache = new RedisCache(CACHE_NAME, NO_PREFIX_BYTES, templateSpy, EXPIRATION);
@@ -135,10 +126,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, times(1)).zRange(eq(KNOWN_KEYS_SET_NAME_BYTES), eq(0L), eq(127L));
}
/**
* @see DATAREDIS-369
*/
@Test
@Test // DATAREDIS-369
public void clearShouldCallLuaScriptToRemoveKeysWhenPrefixIsSet() {
cache = new RedisCache(CACHE_NAME, PREFIX_BYTES, templateSpy, EXPIRATION);
@@ -148,10 +136,7 @@ public class RedisCacheUnitTests {
eq((PREFIX + "*").getBytes()));
}
/**
* @see DATAREDIS-402
*/
@Test
@Test // DATAREDIS-402
public void putShouldNotExpireKnownKeysSetWhenTtlIsZero() {
cache = new RedisCache(CACHE_NAME, NO_PREFIX_BYTES, templateSpy, 0L);
@@ -160,10 +145,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, never()).expire(eq(KNOWN_KEYS_SET_NAME_BYTES), anyLong());
}
/**
* @see DATAREDIS-542
*/
@Test
@Test // DATAREDIS-542
public void putIfAbsentShouldExpireWhenValueWasSet() {
when(connectionMock.setNX(KEY_BYTES, VALUE_BYTES)).thenReturn(true);
@@ -176,10 +158,7 @@ public class RedisCacheUnitTests {
verify(connectionMock).expire(eq(KEY_BYTES), anyLong());
}
/**
* @see DATAREDIS-542
*/
@Test
@Test // DATAREDIS-542
public void putIfAbsentShouldNotExpireWhenValueWasNotSetAndRedisContainsOtherData() {
String other = "other";
@@ -194,10 +173,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, never()).expire(eq(KEY_BYTES), anyLong());
}
/**
* @see DATAREDIS-542
*/
@Test
@Test // DATAREDIS-542
public void putIfAbsentShouldNotSetExpireWhenValueWasNotSetAndRedisContainsSameData() {
when(connectionMock.setNX(KEY_BYTES, VALUE_BYTES)).thenReturn(false);
@@ -210,10 +186,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, never()).expire(eq(KEY_BYTES), anyLong());
}
/**
* @see DATAREDIS-443
*/
@Test
@Test // DATAREDIS-443
@SuppressWarnings("unchecked")
public void getWithCallable() throws ClassNotFoundException {
@@ -236,10 +209,7 @@ public class RedisCacheUnitTests {
});
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
@SuppressWarnings("unchecked")
public void getWithCallableShouldStoreNullNotAllowingNull() throws ClassNotFoundException {
@@ -258,10 +228,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, times(1)).exec();
}
/**
* @see DATAREDIS-553
*/
@Test
@Test // DATAREDIS-553
@SuppressWarnings("unchecked")
public void getWithCallableShouldStoreNullAllowingNull() throws ClassNotFoundException {
@@ -281,10 +248,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, times(1)).exec();
}
/**
* @see DATAREDIS-443
*/
@Test
@Test // DATAREDIS-443
public void getWithCallableShouldReadValueFromCallableAddToCache() {
cache = new RedisCache(CACHE_NAME, NO_PREFIX_BYTES, templateSpy, 0L);
@@ -302,10 +266,7 @@ public class RedisCacheUnitTests {
verify(connectionMock, times(1)).exec();
}
/**
* @see DATAREDIS-443
*/
@Test
@Test // DATAREDIS-443
@SuppressWarnings("unchecked")
public void getWithCallableShouldNotReadValueFromCallableWhenAlreadyPresent() {
@@ -319,10 +280,7 @@ public class RedisCacheUnitTests {
verifyZeroInteractions(callableMock);
}
/**
* @see DATAREDIS-468
*/
@Test
@Test // DATAREDIS-468
public void noMultiExecForCluster() {
RedisClusterConnection clusterConnectionMock = mock(RedisClusterConnection.class);
@@ -341,10 +299,7 @@ public class RedisCacheUnitTests {
verifyZeroInteractions(connectionMock);
}
/**
* @see DATAREDIS-468
*/
@Test
@Test // DATAREDIS-468
public void getWithCallableForCluster() {
RedisClusterConnection clusterConnectionMock = mock(RedisClusterConnection.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -129,11 +129,8 @@ public class TransactionalRedisCacheManagerWithCommitUnitTests {
IsEqual.equalTo("bar~keys"));
}
/**
* @see DATAREDIS-246
*/
@Rollback(false)
@Test
@Test // DATAREDIS-246
public void testValuesAddedToCacheWhenTransactionIsCommited() {
transactionalService.foo();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -119,11 +119,8 @@ public class TransactionalRedisCacheManagerWithRollbackUnitTests {
any(byte[].class));
}
/**
* @see DATAREDIS-246
*/
@Rollback(true)
@Test
@Test // DATAREDIS-246
public void tesValuesNotAddedToCacheWhenTransactionIsRolledBack() {
transactionalService.foo();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -421,10 +421,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertTrue(waitFor(new KeyExpired("expy"), 2500l));
}
/**
* @see DATAREDIS-271
*/
@Test
@Test // DATAREDIS-271
@IfProfileValue(name = "runLongTests", value = "true")
public void testPsetEx() throws Exception {
@@ -980,10 +977,7 @@ public abstract class AbstractConnectionIntegrationTests {
verifyResults(Arrays.asList(new Object[] { -1L }));
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testTtlWithTimeUnit() {
connection.set("whatup", "yo");
@@ -1017,10 +1011,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertTrue((Long) results.get(1) > -1);
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
@IfProfileValue(name = "redisVersion", value = "2.6+")
public void testPTtlWithTimeUnit() {
@@ -1970,11 +1961,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertNotNull(results.get(0));
}
/**
* @see DATAREDIS-206
* @see DATAREDIS-513
*/
@Test
@Test // DATAREDIS-206, DATAREDIS-513
public void testGetTimeShouldRequestServerTime() {
actual.add(connection.time());
@@ -1985,18 +1972,12 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) results.get(0) > 0, equalTo(true));
}
/**
* @see DATAREDIS-269
*/
@Test
@Test // DATAREDIS-269
public void clientSetNameWorksCorrectly() {
connection.setClientName("foo".getBytes());
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
actual.add(connection.getClientList());
@@ -2012,10 +1993,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(info.getDatabaseId(), is(notNullValue()));
}
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void scanShouldReadEntireValueRange() {
@@ -2046,10 +2024,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(i, is(itemCount));
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
@IfProfileValue(name = "redisVersion", value = "2.8+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void scanShouldReadEntireValueRangeWhenIdividualScanIterationsReturnEmptyCollection() {
@@ -2067,10 +2042,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(i, is(10));
}
/**
* @see DATAREDIS-306
*/
@Test
@Test // DATAREDIS-306
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void zScanShouldReadEntireValueRange() {
@@ -2102,10 +2074,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(count, equalTo(3));
}
/**
* @see DATAREDIS-304
*/
@Test
@Test // DATAREDIS-304
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void sScanShouldReadEntireValueRange() {
@@ -2131,10 +2100,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(i, is(6));
}
/**
* @see DATAREDIS-305
*/
@Test
@Test // DATAREDIS-305
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void hScanShouldReadEntireValueRange() {
@@ -2169,10 +2135,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(i, is(3));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@IfProfileValue(name = "redisVersion", value = "2.8.9+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void pfAddShouldAddToNonExistingKeyCorrectly() {
@@ -2183,10 +2146,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) results.get(0), is(1L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@IfProfileValue(name = "redisVersion", value = "2.8.9+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void pfAddShouldReturnZeroWhenValueAlreadyExists() {
@@ -2201,10 +2161,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) results.get(2), is(0L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@IfProfileValue(name = "redisVersion", value = "2.8.9+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void pfCountShouldReturnCorrectly() {
@@ -2217,10 +2174,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) results.get(1), is(3L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@IfProfileValue(name = "redisVersion", value = "2.8.9+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void pfCountWithMultipleKeysShouldReturnCorrectly() {
@@ -2235,21 +2189,15 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) results.get(2), is(6L));
}
/**
* @see DATAREDIS-308
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-308
@IfProfileValue(name = "redisVersion", value = "2.8.9+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void pfCountWithNullKeysShouldThrowIllegalArgumentException() {
actual.add(connection.pfCount((String[]) null));
}
/**
* @see DATAREDIS-378
*/
@SuppressWarnings("unchecked")
@Test
@Test // DATAREDIS-378
@IfProfileValue(name = "redisVersion", value = "2.9.0+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void zRangeByLexTest() {
@@ -2287,10 +2235,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(values, not(hasItems("a", "b", "c", "d")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndNullOpionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2305,10 +2250,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(500d, 499d)));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndUpsertOpionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2323,10 +2265,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(500d, 499d)));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndUpsertOpionShouldSetTtlWhenKeyDoesExist() {
@@ -2344,10 +2283,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndAbsentOptionShouldSetTtlWhenKeyDoesExist() {
@@ -2365,10 +2301,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("spring")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndAbsentOptionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2385,10 +2318,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndPresentOptionShouldSetTtlWhenKeyDoesExist() {
@@ -2406,10 +2336,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithExpirationAndPresentOptionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2425,10 +2352,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(-2, 0)));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithNullExpirationAndUpsertOpionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2443,10 +2367,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(-1, 0)));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndUpsertOpionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2461,10 +2382,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(-1, 0)));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndUpsertOpionShouldSetTtlWhenKeyDoesExist() {
@@ -2482,10 +2400,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndAbsentOptionShouldSetTtlWhenKeyDoesExist() {
@@ -2503,10 +2418,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("spring")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndAbsentOptionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2523,10 +2435,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndPresentOptionShouldSetTtlWhenKeyDoesExist() {
@@ -2544,10 +2453,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((String) result.get(2)), is(equalTo("data")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void setWithoutExpirationAndPresentOptionShouldSetTtlWhenKeyDoesNotExist() {
@@ -2563,10 +2469,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Long) result.get(1)).doubleValue(), is(closeTo(-2, 0)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoAddSingleGeoLocation() {
@@ -2578,10 +2481,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) result.get(0), is(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoAddMultipleGeoLocations() {
@@ -2593,10 +2493,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat((Long) result.get(0), is(3L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoDist() {
@@ -2610,10 +2507,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Distance) result.get(1)).getUnit(), is("m"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoDistWithMetric() {
@@ -2627,10 +2521,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((Distance) result.get(1)).getUnit(), is("km"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS })
public void geoHash() {
@@ -2644,10 +2535,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((List<String>) result.get(1)).get(1), is("sqdtr74hyu0"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS })
public void geoHashNonExisting() {
@@ -2662,10 +2550,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((List<String>) result.get(1)).get(2), is("sqdtr74hyu0"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoPosition() {
@@ -2683,10 +2568,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((List<Point>) result.get(1)).get(1).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoPositionNonExisting() {
@@ -2706,10 +2588,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((List<Point>) result.get(1)).get(2).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusShouldReturnMembersCorrectly() {
@@ -2725,10 +2604,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((GeoResults<GeoLocation<String>>) results.get(2)).getContent(), hasSize(2));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusShouldReturnDistanceCorrectly() {
@@ -2747,10 +2623,7 @@ public abstract class AbstractConnectionIntegrationTests {
is("km"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusShouldApplyLimit() {
@@ -2765,10 +2638,7 @@ public abstract class AbstractConnectionIntegrationTests {
assertThat(((GeoResults<GeoLocation<String>>) results.get(1)).getContent(), hasSize(2));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusByMemberShouldReturnMembersCorrectly() {
@@ -2786,10 +2656,7 @@ public abstract class AbstractConnectionIntegrationTests {
is(ARIGENTO.getName()));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusByMemberShouldReturnDistanceCorrectly() {
@@ -2808,10 +2675,7 @@ public abstract class AbstractConnectionIntegrationTests {
is("km"));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
@IfProfileValue(name = "redisVersion", value = "3.2+")
@WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE })
public void geoRadiusByMemberShouldApplyLimit() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -120,10 +120,7 @@ abstract public class AbstractConnectionPipelineIntegrationTests extends Abstrac
assertTrue(results.isEmpty());
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
@Ignore
@Override
public void scanShouldReadEntireValueRangeWhenIdividualScanIterationsReturnEmptyCollection() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,10 +107,7 @@ abstract public class AbstractConnectionTransactionIntegrationTests extends Abst
connection.scriptKill();
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
@Ignore
@Override
public void scanShouldReadEntireValueRangeWhenIdividualScanIterationsReturnEmptyCollection() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -111,11 +111,8 @@ public abstract class AbstractTransactionalTestBase {
connection.close();
}
/**
* @see DATAREDIS-73
*/
@Rollback(true)
@Test
@Test // DATAREDIS-73
public void valueOperationSetShouldBeRolledBackCorrectly() {
for (String key : KEYS) {
@@ -123,11 +120,8 @@ public abstract class AbstractTransactionalTestBase {
}
}
/**
* @see DATAREDIS-73
*/
@Rollback(false)
@Test
@Test // DATAREDIS-73
public void valueOperationSetShouldBeCommittedCorrectly() {
this.valuesShouldHaveBeenPersisted = true;
@@ -136,10 +130,7 @@ public abstract class AbstractTransactionalTestBase {
}
}
/**
* @see DATAREDIS-548
*/
@Test
@Test // DATAREDIS-548
@Transactional(readOnly = true)
public void valueOperationShouldWorkWithReadOnlyTransactions() {
@@ -149,11 +140,8 @@ public abstract class AbstractTransactionalTestBase {
}
}
/**
* @see DATAREDIS-73
*/
@Rollback(true)
@Test
@Test // DATAREDIS-73
public void listOperationLPushShoudBeRolledBackCorrectly() {
for (String key : KEYS) {
@@ -161,11 +149,8 @@ public abstract class AbstractTransactionalTestBase {
}
}
/**
* @see DATAREDIS-73
*/
@Rollback(false)
@Test
@Test // DATAREDIS-73
public void listOperationLPushShouldBeCommittedCorrectly() {
this.valuesShouldHaveBeenPersisted = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -131,10 +131,7 @@ public class ClusterCommandExecutorUnitTests {
this.executor.destroy();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnSingleNodeShouldBeExecutedCorrectly() {
executor.executeCommandOnSingleNode(COMMAND_CALLBACK, CLUSTER_NODE_2);
@@ -142,10 +139,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con2, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnSingleNodeByHostAndPortShouldBeExecutedCorrectly() {
executor.executeCommandOnSingleNode(COMMAND_CALLBACK,
@@ -154,10 +148,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con2, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnSingleNodeByNodeIdShouldBeExecutedCorrectly() {
executor.executeCommandOnSingleNode(COMMAND_CALLBACK, new RedisClusterNode(CLUSTER_NODE_2.id));
@@ -165,34 +156,22 @@ public class ClusterCommandExecutorUnitTests {
verify(con2, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void executeCommandOnSingleNodeShouldThrowExceptionWhenNodeIsNull() {
executor.executeCommandOnSingleNode(COMMAND_CALLBACK, null);
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void executeCommandOnSingleNodeShouldThrowExceptionWhenCommandCallbackIsNull() {
executor.executeCommandOnSingleNode(null, CLUSTER_NODE_1);
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void executeCommandOnSingleNodeShouldThrowExceptionWhenNodeIsUnknown() {
executor.executeCommandOnSingleNode(COMMAND_CALLBACK, UNKNOWN_CLUSTER_NODE);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldExecuteCommandOnGivenNodes() {
ClusterCommandExecutor executor = new ClusterCommandExecutor(new MockClusterNodeProvider(),
@@ -206,10 +185,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con3, never()).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldExecuteCommandOnGivenNodesByHostAndPort() {
ClusterCommandExecutor executor = new ClusterCommandExecutor(new MockClusterNodeProvider(),
@@ -225,10 +201,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con3, never()).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldExecuteCommandOnGivenNodesByNodeId() {
ClusterCommandExecutor executor = new ClusterCommandExecutor(new MockClusterNodeProvider(),
@@ -243,10 +216,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con3, never()).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldFailOnGivenUnknownNodes() {
ClusterCommandExecutor executor = new ClusterCommandExecutor(new MockClusterNodeProvider(),
@@ -257,10 +227,7 @@ public class ClusterCommandExecutorUnitTests {
Arrays.asList(new RedisClusterNode("unknown"), CLUSTER_NODE_2_LOOKUP));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnAllNodesShouldExecuteCommandOnEveryKnownClusterNode() {
ClusterCommandExecutor executor = new ClusterCommandExecutor(new MockClusterNodeProvider(),
@@ -274,10 +241,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con3, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldCompleteAndCollectErrorsOfAllNodes() {
when(con1.theWheelWeavesAsTheWheelWills()).thenReturn("rand");
@@ -297,10 +261,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con3, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandAsyncOnNodesShouldCollectResultsCorrectly() {
when(con1.theWheelWeavesAsTheWheelWills()).thenReturn("rand");
@@ -312,11 +273,7 @@ public class ClusterCommandExecutorUnitTests {
assertThat(result.resultsAsList(), hasItems("rand", "mat", "perrin"));
}
/**
* @see DATAREDIS-315
* @see DATAREDIS-467
*/
@Test
@Test // DATAREDIS-315, DATAREDIS-467
public void executeMultikeyCommandShouldRunCommandAcrossCluster() {
// key-1 and key-9 map both to node1
@@ -335,10 +292,7 @@ public class ClusterCommandExecutorUnitTests {
assertThat(captor.getAllValues().size(), is(2));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnSingleNodeAndFollowRedirect() {
when(con1.theWheelWeavesAsTheWheelWills()).thenThrow(new MovedException(CLUSTER_NODE_3_HOST, CLUSTER_NODE_3_PORT));
@@ -350,10 +304,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con2, never()).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnSingleNodeAndFollowRedirectButStopsAfterMaxRedirects() {
when(con1.theWheelWeavesAsTheWheelWills()).thenThrow(new MovedException(CLUSTER_NODE_3_HOST, CLUSTER_NODE_3_PORT));
@@ -372,10 +323,7 @@ public class ClusterCommandExecutorUnitTests {
verify(con2, times(1)).theWheelWeavesAsTheWheelWills();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeCommandOnArbitraryNodeShouldPickARandomNode() {
executor.executeCommandOnArbitraryNode(COMMAND_CALLBACK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -974,9 +974,7 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testTtl();
}
/**
* @see DATAREDIS-526
*/
// DATAREDIS-526
@Override
public void testTtlWithTimeUnit() {
doReturn(Arrays.asList(new Object[] { 5L })).when(nativeConnection).closePipeline();
@@ -1322,29 +1320,21 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testZUnionStore();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddBytes() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).closePipeline();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAdd() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).closePipeline();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithGeoLocationBytes() {
@@ -1352,9 +1342,7 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testGeoAddWithGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithGeoLocation() {
@@ -1362,29 +1350,21 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testGeoAddWithGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMapBytes() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).closePipeline();
super.testGeoAddCoordinateMapBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMap() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).closePipeline();
super.testGeoAddCoordinateMap();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithIterableOfGeoLocationBytes() {
@@ -1392,9 +1372,7 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testGeoAddWithIterableOfGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithIterableOfGeoLocation() {
@@ -1402,180 +1380,126 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
super.testGeoAddWithIterableOfGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDistBytes() {
doReturn(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS))).when(nativeConnection).closePipeline();
super.testGeoDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDist() {
doReturn(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS))).when(nativeConnection).closePipeline();
super.testGeoDist();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHashBytes() {
doReturn(Arrays.asList(Collections.singletonList(bar))).when(nativeConnection).closePipeline();
super.testGeoHashBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHash() {
doReturn(Arrays.asList(Collections.singletonList(bar))).when(nativeConnection).closePipeline();
super.testGeoHash();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPosBytes() {
doReturn(Arrays.asList(points)).when(nativeConnection).closePipeline();
super.testGeoPosBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPos() {
doReturn(Arrays.asList(points)).when(nativeConnection).closePipeline();
super.testGeoPos();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParamBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParam() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDistBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDist() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithDist();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDescBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithCoordAndDescBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDesc() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusWithCoordAndDesc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParamBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParam() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAscBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithDistAndAscBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAsc() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithDistAndAsc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCountBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithCoordAndCountBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCount() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).closePipeline();
@@ -1705,10 +1629,7 @@ public class DefaultStringRedisConnectionPipelineTests extends DefaultStringRedi
verifyResults(Arrays.asList(new Object[] { barBytes, 3l }));
}
/**
* @see DATAREDIS-206
*/
@Test
@Test // DATAREDIS-206
@Override
public void testTimeIsDelegatedCorrectlyToNativeConnection() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1048,9 +1048,7 @@ public class DefaultStringRedisConnectionPipelineTxTests extends DefaultStringRe
super.testTtl();
}
/**
* @see DATAREDIS-526
*/
// DATAREDIS-526
@Override
public void testTtlWithTimeUnit() {
@@ -1567,90 +1565,63 @@ public class DefaultStringRedisConnectionPipelineTxTests extends DefaultStringRe
results);
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddBytes() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAdd() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithGeoLocationBytes() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddWithGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithGeoLocation() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddWithGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMapBytes() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddCoordinateMapBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMap() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddCoordinateMap();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithIterableOfGeoLocationBytes() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddWithIterableOfGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithIterableOfGeoLocation() {
doReturn(Arrays.asList(Collections.singletonList(1L))).when(nativeConnection).closePipeline();
super.testGeoAddWithIterableOfGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDistBytes() {
doReturn(Arrays.asList(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS)))).when(nativeConnection)
@@ -1658,10 +1629,7 @@ public class DefaultStringRedisConnectionPipelineTxTests extends DefaultStringRe
super.testGeoDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDist() {
doReturn(Arrays.asList(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS)))).when(nativeConnection)
@@ -1669,160 +1637,112 @@ public class DefaultStringRedisConnectionPipelineTxTests extends DefaultStringRe
super.testGeoDist();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHashBytes() {
doReturn(Arrays.asList(Arrays.asList(Collections.singletonList(bar)))).when(nativeConnection).closePipeline();
super.testGeoHashBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHash() {
doReturn(Arrays.asList(Arrays.asList(Collections.singletonList(bar)))).when(nativeConnection).closePipeline();
super.testGeoHash();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPosBytes() {
doReturn(Arrays.asList(Arrays.asList(points))).when(nativeConnection).closePipeline();
super.testGeoPosBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPos() {
doReturn(Arrays.asList(Arrays.asList(points))).when(nativeConnection).closePipeline();
super.testGeoPos();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParamBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParam() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDistBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDist() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithDist();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDescBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithCoordAndDescBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDesc() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusWithCoordAndDesc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParamBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParam() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAscBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithDistAndAscBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAsc() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithDistAndAsc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCountBytes() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();
super.testGeoRadiusByMemberWithCoordAndCountBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCount() {
doReturn(Arrays.asList(Arrays.asList(geoResults))).when(nativeConnection).closePipeline();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -932,10 +932,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(new Object[] { true }));
}
/**
* @see DATAREDIS-271
*/
@Test
@Test // DATAREDIS-271
public void testPSetExShouldDelegateCallToNativeConnection() {
connection.pSetEx(fooBytes, 10L, barBytes);
@@ -1194,10 +1191,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(new Object[] { 5l }));
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testTtlWithTimeUnit() {
doReturn(5L).when(nativeConnection).ttl(fooBytes, TimeUnit.SECONDS);
@@ -1724,10 +1718,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(new Object[] { "foo" }));
}
/**
* @see DATAREDIS-206
*/
@Test
@Test // DATAREDIS-206
public void testTimeIsDelegatedCorrectlyToNativeConnection() {
doReturn(1L).when(nativeConnection).time();
@@ -1735,30 +1726,21 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(1L));
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void testShutdownInDelegatedCorrectlyToNativeConnection() {
connection.shutdown(ShutdownOption.NOSAVE);
verify(nativeConnection, times(1)).shutdown(eq(ShutdownOption.NOSAVE));
}
/**
* @see DATAREDIS-269
*/
@Test
@Test // DATAREDIS-269
public void settingClientNameShouldDelegateToNativeConnection() {
connection.setClientName("foo");
verify(nativeConnection, times(1)).setClientName(eq("foo".getBytes()));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
public void pfAddShouldDelegateToNativeConnectionCorrectly() {
connection.pfAdd("hll", "spring", "data", "redis");
@@ -1766,20 +1748,14 @@ public class DefaultStringRedisConnectionTests {
"redis".getBytes());
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
public void pfCountShouldDelegateToNativeConnectionCorrectly() {
connection.pfCount("hll", "hyperLogLog");
verify(nativeConnection, times(1)).pfCount("hll".getBytes(), "hyperLogLog".getBytes());
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
public void pfMergeShouldDelegateToNativeConnectionCorrectly() {
connection.pfMerge("merged", "spring", "data", "redis");
@@ -1787,20 +1763,14 @@ public class DefaultStringRedisConnectionTests {
"redis".getBytes());
}
/**
* @see DATAREDIS-270
*/
@Test
@Test // DATAREDIS-270
public void testGetClientNameIsDelegatedCorrectlyToNativeConnection() {
actual.add(connection.getClientName());
verify(nativeConnection, times(1)).getClientName();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddBytes() {
doReturn(1l).when(nativeConnection).geoAdd(fooBytes, new Point(1.23232, 34.2342434), barBytes);
@@ -1809,10 +1779,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAdd() {
doReturn(1l).when(nativeConnection).geoAdd(fooBytes, new Point(1.23232, 34.2342434), barBytes);
@@ -1821,10 +1788,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithGeoLocationBytes() {
doReturn(1l).when(nativeConnection).geoAdd(fooBytes,
@@ -1834,10 +1798,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithGeoLocation() {
doReturn(1l).when(nativeConnection).geoAdd(fooBytes, new Point(1.23232, 34.2342434), barBytes);
@@ -1846,10 +1807,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMapBytes() {
Map<byte[], Point> memberGeoCoordinateMap = Collections.singletonMap(barBytes, new Point(1.23232, 34.2342434));
@@ -1859,10 +1817,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMap() {
doReturn(1l).when(nativeConnection).geoAdd(any(byte[].class), anyMapOf(byte[].class, Point.class));
@@ -1871,10 +1826,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithIterableOfGeoLocationBytes() {
List<GeoLocation<byte[]>> values = Collections.singletonList(new GeoLocation<byte[]>(barBytes, new Point(1, 2)));
@@ -1884,10 +1836,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithIterableOfGeoLocation() {
doReturn(1l).when(nativeConnection).geoAdd(eq(fooBytes), anyMapOf(byte[].class, Point.class));
@@ -1896,10 +1845,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDistBytes() {
doReturn(new Distance(102121.12d, DistanceUnit.METERS)).when(nativeConnection).geoDist(fooBytes, barBytes,
@@ -1909,10 +1855,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(new Distance(102121.12d, DistanceUnit.METERS)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDist() {
doReturn(new Distance(102121.12d, DistanceUnit.METERS)).when(nativeConnection).geoDist(fooBytes, barBytes,
@@ -1922,10 +1865,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Collections.singletonList(new Distance(102121.12d, DistanceUnit.METERS)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHashBytes() {
doReturn(stringList).when(nativeConnection).geoHash(fooBytes, barBytes);
@@ -1934,10 +1874,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Collections.singletonList(bar)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHash() {
doReturn(stringList).when(nativeConnection).geoHash(fooBytes, barBytes);
@@ -1946,10 +1883,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Collections.singletonList(bar)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPosBytes() {
doReturn(points).when(nativeConnection).geoPos(fooBytes, barBytes);
@@ -1958,10 +1892,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(points));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPos() {
doReturn(points).when(nativeConnection).geoPos(fooBytes, barBytes);
@@ -1969,10 +1900,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(points));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParamBytes() {
doReturn(geoResults).when(nativeConnection).geoRadius(eq(fooBytes), any(Circle.class));
@@ -1981,10 +1909,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParam() {
doReturn(geoResults).when(nativeConnection).geoRadius(eq(fooBytes), any(Circle.class));
@@ -1994,10 +1919,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Converters.deserializingGeoResultsConverter(serializer).convert(geoResults)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDistBytes() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance();
@@ -2008,10 +1930,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDist() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance();
@@ -2022,10 +1941,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Converters.deserializingGeoResultsConverter(serializer).convert(geoResults)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDescBytes() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeCoordinates().sortDescending();
@@ -2036,10 +1952,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDesc() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeCoordinates().sortDescending();
doReturn(geoResults).when(nativeConnection).geoRadius(eq(fooBytes), any(Circle.class), eq(geoRadiusParam));
@@ -2049,10 +1962,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Converters.deserializingGeoResultsConverter(serializer).convert(geoResults)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParamBytes() {
doReturn(geoResults).when(nativeConnection).geoRadiusByMember(fooBytes, barBytes,
@@ -2062,10 +1972,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParam() {
doReturn(geoResults).when(nativeConnection).geoRadiusByMember(fooBytes, barBytes,
@@ -2075,10 +1982,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Converters.deserializingGeoResultsConverter(serializer).convert(geoResults)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAscBytes() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance().sortAscending();
@@ -2090,10 +1994,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAsc() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance().sortAscending();
@@ -2104,10 +2005,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(Converters.deserializingGeoResultsConverter(serializer).convert(geoResults)));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCountBytes() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance().limit(23);
@@ -2119,10 +2017,7 @@ public class DefaultStringRedisConnectionTests {
verifyResults(Arrays.asList(geoResults));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCount() {
GeoRadiusCommandArgs geoRadiusParam = GeoRadiusCommandArgs.newGeoRadiusArgs().includeDistance().limit(23);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -959,9 +959,7 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testTtl();
}
/**
* @see DATAREDIS-526
*/
// DATAREDIS-526
@Override
public void testTtlWithTimeUnit() {
@@ -1444,10 +1442,7 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
verifyResults(Arrays.asList(new Object[] { foo }));
}
/**
* @see DATAREDIS-206
*/
@Test
@Test // DATAREDIS-206
@Override
public void testTimeIsDelegatedCorrectlyToNativeConnection() {
@@ -1456,28 +1451,20 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testTimeIsDelegatedCorrectlyToNativeConnection();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddBytes() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).exec();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAdd() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).exec();
super.testGeoAddBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithGeoLocationBytes() {
@@ -1485,9 +1472,7 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testGeoAddWithGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithGeoLocation() {
@@ -1495,27 +1480,19 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testGeoAddWithGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMapBytes() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).exec();
super.testGeoAddCoordinateMapBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddCoordinateMap() {
doReturn(Collections.singletonList(1L)).when(nativeConnection).exec();
super.testGeoAddCoordinateMap();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithIterableOfGeoLocationBytes() {
@@ -1523,9 +1500,7 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testGeoAddWithIterableOfGeoLocationBytes();
}
/**
* @see DATAREDIS-438
*/
// DATAREDIS-438
@Override
public void testGeoAddWithIterableOfGeoLocation() {
@@ -1533,100 +1508,70 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testGeoAddWithIterableOfGeoLocation();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDistBytes() {
doReturn(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS))).when(nativeConnection).exec();
super.testGeoDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoDist() {
doReturn(Arrays.asList(new Distance(102121.12d, DistanceUnit.METERS))).when(nativeConnection).exec();
super.testGeoDist();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHashBytes() {
doReturn(Arrays.asList(Collections.singletonList(bar))).when(nativeConnection).exec();
super.testGeoHashBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHash() {
doReturn(Arrays.asList(Collections.singletonList(bar))).when(nativeConnection).exec();
super.testGeoHash();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPosBytes() {
doReturn(Arrays.asList(points)).when(nativeConnection).exec();
super.testGeoPosBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPos() {
doReturn(Arrays.asList(points)).when(nativeConnection).exec();
super.testGeoPos();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParamBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithoutParam() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDistBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusWithDistBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithDist() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
@@ -1640,70 +1585,49 @@ public class DefaultStringRedisConnectionTxTests extends DefaultStringRedisConne
super.testGeoRadiusWithCoordAndDescBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusWithCoordAndDesc() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusWithCoordAndDesc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParamBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusByMemberWithoutParamBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithoutParam() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusByMemberWithoutParam();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAscBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusByMemberWithDistAndAscBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithDistAndAsc() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusByMemberWithDistAndAsc();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCountBytes() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();
super.testGeoRadiusByMemberWithCoordAndCountBytes();
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRadiusByMemberWithCoordAndCount() {
doReturn(Arrays.asList(geoResults)).when(nativeConnection).exec();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,10 +40,7 @@ public class RedisClusterConfigurationUnitTests {
static final String HOST_AND_PORT_3 = "localhost:789";
static final String HOST_AND_NO_PORT = "localhost";
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldCreateRedisClusterConfigurationCorrectly() {
RedisClusterConfiguration config = new RedisClusterConfiguration(Collections.singleton(HOST_AND_PORT_1));
@@ -53,10 +50,7 @@ public class RedisClusterConfigurationUnitTests {
assertThat(config.getMaxRedirects(), nullValue());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldCreateRedisClusterConfigurationCorrectlyGivenMultipleHostAndPortStrings() {
RedisClusterConfiguration config = new RedisClusterConfiguration(new HashSet<String>(Arrays.asList(HOST_AND_PORT_1,
@@ -67,26 +61,17 @@ public class RedisClusterConfigurationUnitTests {
hasItems(new RedisNode("127.0.0.1", 123), new RedisNode("localhost", 456), new RedisNode("localhost", 789)));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void shouldThrowExecptionOnInvalidHostAndPortString() {
new RedisClusterConfiguration(Collections.singleton(HOST_AND_NO_PORT));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void shouldThrowExceptionWhenListOfHostAndPortIsNull() {
new RedisClusterConfiguration(Collections.<String> singleton(null));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldNotFailWhenListOfHostAndPortIsEmpty() {
RedisClusterConfiguration config = new RedisClusterConfiguration(Collections.<String> emptySet());
@@ -94,18 +79,12 @@ public class RedisClusterConfigurationUnitTests {
assertThat(config.getClusterNodes().size(), is(0));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void shouldThrowExceptionGivenNullPropertySource() {
new RedisClusterConfiguration((PropertySource<?>) null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldNotFailWhenGivenPropertySourceNotContainingRelevantProperties() {
RedisClusterConfiguration config = new RedisClusterConfiguration(new MockPropertySource());
@@ -114,10 +93,7 @@ public class RedisClusterConfigurationUnitTests {
assertThat(config.getClusterNodes().size(), is(0));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldBeCreatedCorrecltyGivenValidPropertySourceWithSingleHostPort() {
MockPropertySource propertySource = new MockPropertySource();
@@ -130,10 +106,7 @@ public class RedisClusterConfigurationUnitTests {
assertThat(config.getClusterNodes(), hasItems(new RedisNode("127.0.0.1", 123)));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldBeCreatedCorrecltyGivenValidPropertySourceWithMultipleHostPort() {
MockPropertySource propertySource = new MockPropertySource();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,10 +62,7 @@ public class RedisConnectionUnitTests {
connection.setSentinelConnection(sentinelConnectionMock);
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldCloseSentinelConnectionAlongWithRedisConnection() throws IOException {
when(sentinelConnectionMock.isOpen()).thenReturn(true).thenReturn(false);
@@ -77,10 +74,7 @@ public class RedisConnectionUnitTests {
verify(sentinelConnectionMock, times(1)).close();
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldNotTryToCloseSentinelConnectionsWhenAlreadyClosed() throws IOException {
when(sentinelConnectionMock.isOpen()).thenReturn(true);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,10 +39,7 @@ public class RedisSentinelConfigurationUnitTests {
static final String HOST_AND_PORT_3 = "localhost:789";
static final String HOST_AND_NO_PORT = "localhost";
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldCreateRedisSentinelConfigurationCorrectlyGivenMasterAndSingleHostAndPortString() {
RedisSentinelConfiguration config = new RedisSentinelConfiguration("mymaster",
@@ -52,10 +49,7 @@ public class RedisSentinelConfigurationUnitTests {
assertThat(config.getSentinels(), hasItems(new RedisNode("127.0.0.1", 123)));
}
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldCreateRedisSentinelConfigurationCorrectlyGivenMasterAndMultipleHostAndPortStrings() {
RedisSentinelConfiguration config = new RedisSentinelConfiguration("mymaster", new HashSet<String>(Arrays.asList(
@@ -66,26 +60,17 @@ public class RedisSentinelConfigurationUnitTests {
hasItems(new RedisNode("127.0.0.1", 123), new RedisNode("localhost", 456), new RedisNode("localhost", 789)));
}
/**
* @see DATAREDIS-372
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-372
public void shouldThrowExecptionOnInvalidHostAndPortString() {
new RedisSentinelConfiguration("mymaster", Collections.singleton(HOST_AND_NO_PORT));
}
/**
* @see DATAREDIS-372
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-372
public void shouldThrowExceptionWhenListOfHostAndPortIsNull() {
new RedisSentinelConfiguration("mymaster", Collections.<String> singleton(null));
}
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldNotFailWhenListOfHostAndPortIsEmpty() {
RedisSentinelConfiguration config = new RedisSentinelConfiguration("mymaster", Collections.<String> emptySet());
@@ -93,18 +78,12 @@ public class RedisSentinelConfigurationUnitTests {
assertThat(config.getSentinels().size(), is(0));
}
/**
* @see DATAREDIS-372
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-372
public void shouldThrowExceptionGivenNullPropertySource() {
new RedisSentinelConfiguration((PropertySource<?>) null);
}
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldNotFailWhenGivenPropertySourceNotContainingRelevantProperties() {
RedisSentinelConfiguration config = new RedisSentinelConfiguration(new MockPropertySource());
@@ -113,10 +92,7 @@ public class RedisSentinelConfigurationUnitTests {
assertThat(config.getSentinels().size(), is(0));
}
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldBeCreatedCorrecltyGivenValidPropertySourceWithMasterAndSingleHostPort() {
MockPropertySource propertySource = new MockPropertySource();
@@ -130,10 +106,7 @@ public class RedisSentinelConfigurationUnitTests {
assertThat(config.getSentinels(), hasItems(new RedisNode("127.0.0.1", 123)));
}
/**
* @see DATAREDIS-372
*/
@Test
@Test // DATAREDIS-372
public void shouldBeCreatedCorrecltyGivenValidPropertySourceWithMasterAndMultipleHostPort() {
MockPropertySource propertySource = new MockPropertySource();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,10 +58,7 @@ public class ConvertersUnitTests {
private static final String CLUSTER_NODE_IMPORTING_SLOT = "ef570f86c7b1a953846668debc177a3a16733420 127.0.0.1:6379 myself,master - 0 0 1 connected [5461-<-0f2ee5df45d18c50aca07228cc18b1da96fd5e84]";
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void toSetOfRedis30ClusterNodesShouldConvertSingleStringNodesResponseCorrectly() {
Iterator<RedisClusterNode> nodes = Converters.toSetOfRedisClusterNodes(REDIS_3_0_CLUSTER_NODES_RESPONSE).iterator();
@@ -111,10 +108,7 @@ public class ConvertersUnitTests {
assertThat(node.getLinkState(), is(LinkState.CONNECTED));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void toSetOfRedis32ClusterNodesShouldConvertSingleStringNodesResponseCorrectly() {
Iterator<RedisClusterNode> nodes = Converters.toSetOfRedisClusterNodes(REDIS_3_2_CLUSTER_NODES_RESPONSE).iterator();
@@ -164,10 +158,7 @@ public class ConvertersUnitTests {
assertThat(node.getLinkState(), is(LinkState.CONNECTED));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void toSetOfRedisClusterNodesShouldConvertNodesWithSingleSlotCorrectly() {
Iterator<RedisClusterNode> nodes = Converters.toSetOfRedisClusterNodes(CLUSTER_NODE_WITH_SINGLE_SLOT_RESPONSE)
@@ -181,10 +172,7 @@ public class ConvertersUnitTests {
assertThat(node.getSlotRange().contains(3456), is(true));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void toSetOfRedisClusterNodesShouldParseLinkStateAndDisconnectedCorrectly() {
Iterator<RedisClusterNode> nodes = Converters.toSetOfRedisClusterNodes(
@@ -200,10 +188,7 @@ public class ConvertersUnitTests {
assertThat(node.getSlotRange().getSlots().size(), is(0));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void toSetOfRedisClusterNodesShouldIgnoreImportingSlot() {
Iterator<RedisClusterNode> nodes = Converters.toSetOfRedisClusterNodes(CLUSTER_NODE_IMPORTING_SLOT).iterator();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,10 +103,7 @@ public class JedisClusterConnectionUnitTests {
connection = new JedisClusterConnection(clusterMock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void thowsExceptionWhenClusterCommandExecturorIsNull() {
expectedException.expect(IllegalArgumentException.class);
@@ -114,10 +111,7 @@ public class JedisClusterConnectionUnitTests {
new JedisClusterConnection(clusterMock, null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterMeetShouldSendCommandsToExistingNodesCorrectly() {
connection.clusterMeet(UNKNOWN_CLUSTER_NODE);
@@ -127,10 +121,7 @@ public class JedisClusterConnectionUnitTests {
verify(con2Mock, times(1)).clusterMeet(UNKNOWN_CLUSTER_NODE.getHost(), UNKNOWN_CLUSTER_NODE.getPort());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterMeetShouldThrowExceptionWhenNodeIsNull() {
expectedException.expect(IllegalArgumentException.class);
@@ -138,10 +129,7 @@ public class JedisClusterConnectionUnitTests {
connection.clusterMeet(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterForgetShouldSendCommandsToRemainingNodesCorrectly() {
connection.clusterForget(CLUSTER_NODE_2);
@@ -151,10 +139,7 @@ public class JedisClusterConnectionUnitTests {
verify(con3Mock, times(1)).clusterForget(CLUSTER_NODE_2.getId());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterReplicateShouldSendCommandsCorrectly() {
connection.clusterReplicate(CLUSTER_NODE_1, CLUSTER_NODE_2);
@@ -164,10 +149,7 @@ public class JedisClusterConnectionUnitTests {
verifyZeroInteractions(con1Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void closeShouldNotCloseUnderlyingClusterPool() throws IOException {
connection.close();
@@ -175,10 +157,7 @@ public class JedisClusterConnectionUnitTests {
verify(clusterMock, never()).close();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void isClosedShouldReturnConnectionStateCorrectly() {
assertThat(connection.isClosed(), is(false));
@@ -188,10 +167,7 @@ public class JedisClusterConnectionUnitTests {
assertThat(connection.isClosed(), is(true));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterInfoShouldBeReturnedCorrectly() {
when(con1Mock.clusterInfo()).thenReturn(CLUSTER_INFO_RESPONSE);
@@ -204,10 +180,7 @@ public class JedisClusterConnectionUnitTests {
verifyInvocationsAcross("clusterInfo", times(1), con1Mock, con2Mock, con3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotImportingShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.IMPORTING);
@@ -215,10 +188,7 @@ public class JedisClusterConnectionUnitTests {
verify(con1Mock, times(1)).clusterSetSlotImporting(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotMigratingShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.MIGRATING);
@@ -226,10 +196,7 @@ public class JedisClusterConnectionUnitTests {
verify(con1Mock, times(1)).clusterSetSlotMigrating(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotStableShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.STABLE);
@@ -237,10 +204,7 @@ public class JedisClusterConnectionUnitTests {
verify(con1Mock, times(1)).clusterSetSlotStable(eq(100));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotNodeShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.NODE);
@@ -248,10 +212,7 @@ public class JedisClusterConnectionUnitTests {
verify(con1Mock, times(1)).clusterSetSlotNode(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotShouldBeExecutedOnTargetNodeWhenNodeIdNotSet() {
connection.clusterSetSlot(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT), 100, AddSlots.IMPORTING);
@@ -259,18 +220,12 @@ public class JedisClusterConnectionUnitTests {
verify(con2Mock, times(1)).clusterSetSlotImporting(eq(100), eq(CLUSTER_NODE_2.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void clusterSetSlotShouldThrowExceptionWhenModeIsNull() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterDeleteSlotsShouldBeExecutedCorrectly() {
int[] slots = new int[] { 9000, 10000 };
@@ -279,18 +234,12 @@ public class JedisClusterConnectionUnitTests {
verify(con2Mock, times(1)).clusterDelSlots((int[]) anyVararg());
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void clusterDeleteSlotShouldThrowExceptionWhenNodeIsNull() {
connection.clusterDeleteSlots(null, new int[] { 1 });
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void timeShouldBeExecutedOnArbitraryNode() {
List<String> values = Arrays.asList("1449655759", "92217");
@@ -303,10 +252,7 @@ public class JedisClusterConnectionUnitTests {
verifyInvocationsAcross("time", times(1), con1Mock, con2Mock, con3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void timeShouldBeExecutedOnSingleNode() {
when(con2Mock.time()).thenReturn(Arrays.asList("1449655759", "92217"));
@@ -318,10 +264,7 @@ public class JedisClusterConnectionUnitTests {
verifyZeroInteractions(con1Mock, con3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void resetConfigStatsShouldBeExecutedOnAllNodes() {
connection.resetConfigStats();
@@ -331,10 +274,7 @@ public class JedisClusterConnectionUnitTests {
verify(con3Mock, times(1)).configResetStat();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void resetConfigStatsShouldBeExecutedOnSingleNodeCorrectly() {
connection.resetConfigStats(CLUSTER_NODE_2);
@@ -344,10 +284,7 @@ public class JedisClusterConnectionUnitTests {
verify(con3Mock, never()).configResetStat();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterTopologyProviderShouldCollectErrorsWhenLoadingNodes() {
expectedException.expect(ClusterStateFailureException.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,18 +49,12 @@ public class JedisConnectionFactoryTests {
factory.destroy();
}
/**
* @see DATAREDIS-324
*/
@Test
@Test // DATAREDIS-324
public void shouldSendCommandCorrectlyViaConnectionFactoryUsingSentinel() {
assertThat(factory.getConnection().ping(), equalTo("PONG"));
}
/**
* @see DATAREDIS-552
*/
@Test
@Test // DATAREDIS-552
public void getClientNameShouldEqualWithFactorySetting() {
assertThat(factory.getConnection().getClientName(), equalTo("clientName"));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,10 +42,7 @@ public class JedisConnectionFactoryUnitTests {
private static final RedisClusterConfiguration CLUSTER_CONFIG = new RedisClusterConfiguration().clusterNode(
"127.0.0.1", 6379).clusterNode("127.0.0.1", 6380);
/**
* @see DATAREDIS-324
*/
@Test
@Test // DATAREDIS-324
public void shouldInitSentinelPoolWhenSentinelConfigPresent() {
connectionFactory = initSpyedConnectionFactory(SINGLE_SENTINEL_CONFIG, new JedisPoolConfig());
@@ -55,10 +52,7 @@ public class JedisConnectionFactoryUnitTests {
verify(connectionFactory, never()).createRedisPool();
}
/**
* @see DATAREDIS-324
*/
@Test
@Test // DATAREDIS-324
public void shouldInitJedisPoolWhenNoSentinelConfigPresent() {
connectionFactory = initSpyedConnectionFactory((RedisSentinelConfiguration) null, new JedisPoolConfig());
@@ -68,10 +62,7 @@ public class JedisConnectionFactoryUnitTests {
verify(connectionFactory, never()).createRedisSentinelPool(Matchers.any(RedisSentinelConfiguration.class));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldInitConnectionCorrectlyWhenClusterConfigPresent() {
connectionFactory = initSpyedConnectionFactory(CLUSTER_CONFIG, new JedisPoolConfig());
@@ -82,11 +73,7 @@ public class JedisConnectionFactoryUnitTests {
verify(connectionFactory, never()).createRedisPool();
}
/**
* @throws IOException
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldClostClusterCorrectlyOnFactoryDestruction() throws IOException {
JedisCluster clusterMock = mock(JedisCluster.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -343,11 +343,8 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
factory2.destroy();
}
/**
* @see DATAREDIS-285
*/
@SuppressWarnings("unchecked")
@Test
@Test // DATAREDIS-285
public void testExecuteShouldConvertArrayReplyCorrectly() {
connection.set("spring", "awesome");
connection.set("data", "cool");
@@ -359,10 +356,7 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
"cool".getBytes(), "supercalifragilisticexpialidocious".getBytes())));
}
/**
* @see DATAREDIS-286
*/
@Test
@Test // DATAREDIS-286
public void expireShouldSupportExiprationForValuesLargerThanInteger() {
connection.set("expireKey", "foo");
@@ -374,10 +368,7 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
assertThat(ttl, is(seconds));
}
/**
* @see DATAREDIS-286
*/
@Test
@Test // DATAREDIS-286
public void pExpireShouldSupportExiprationForValuesLargerThanInteger() {
connection.set("pexpireKey", "foo");
@@ -390,10 +381,7 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
millis, ttl, millis - ttl), millis - ttl < 20L);
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
@RequiresRedisSentinel(SentinelsAvailable.ONE_ACTIVE)
public void shouldReturnSentinelCommandsWhenWhenActiveSentinelFound() {
@@ -402,18 +390,12 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
assertThat(connection.getSentinelConnection(), notNullValue());
}
/**
* @see DATAREDIS-552
*/
@Test
@Test // DATAREDIS-552
public void shouldSetClientName() {
assertThat(connection.getClientName(), is(equalTo("jedis-client")));
}
/**
* @see DATAREDIS-106
*/
@Test
@Test // DATAREDIS-106
public void zRangeByScoreTest() {
connection.zAdd("myzset", 1, "one");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -255,27 +255,18 @@ public class JedisConnectionPipelineIntegrationTests extends AbstractConnectionP
super.testZAddMultiple();
}
/**
* @see DATAREDIS-269
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-269
public void clientSetNameWorksCorrectly() {
super.clientSetNameWorksCorrectly();
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}
/**
* @see DATAREDIS-296
*/
@Test(expected = InvalidDataAccessApiUsageException.class)
@Test(expected = InvalidDataAccessApiUsageException.class) // DATAREDIS-296
public void testExecWithoutMulti() {
super.testExecWithoutMulti();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,11 +69,8 @@ public class JedisConnectionPipelineTxIntegrationTests extends JedisConnectionTr
return txResults;
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2013 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -198,19 +198,13 @@ public class JedisConnectionTransactionIntegrationTests extends AbstractConnecti
super.testRestoreExistingKey();
}
/**
* @see DATAREDIS-269
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-269
public void clientSetNameWorksCorrectly() {
super.clientSetNameWorksCorrectly();
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,10 +63,7 @@ public class JedisConnectionUnitTestSuite {
connection = new JedisConnection(jedisSpy);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNullShouldDelegateCommandCorrectly() {
connection.shutdown(null);
@@ -74,10 +71,7 @@ public class JedisConnectionUnitTestSuite {
verifyNativeConnectionInvocation().shutdown();
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownNosaveShouldBeSentCorrectlyUsingLuaScript() {
connection.shutdown(ShutdownOption.NOSAVE);
@@ -88,10 +82,7 @@ public class JedisConnectionUnitTestSuite {
assertThat(captor.getValue(), equalTo("return redis.call('SHUTDOWN','NOSAVE')".getBytes()));
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownSaveShouldBeSentCorrectlyUsingLuaScript() {
connection.shutdown(ShutdownOption.SAVE);
@@ -102,122 +93,80 @@ public class JedisConnectionUnitTestSuite {
assertThat(captor.getValue(), equalTo("return redis.call('SHUTDOWN','SAVE')".getBytes()));
}
/**
* @see DATAREDIS-267
*/
@Test
@Test // DATAREDIS-267
public void killClientShouldDelegateCallCorrectly() {
connection.killClient("127.0.0.1", 1001);
verifyNativeConnectionInvocation().clientKill(eq("127.0.0.1:1001"));
}
/**
* @see DATAREDIS-270
*/
@Test
@Test // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();
verifyNativeConnectionInvocation().clientGetname();
}
/**
* @see DATAREDIS-277
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-277
public void slaveOfShouldThrowExectpionWhenCalledForNullHost() {
connection.slaveOf(null, 0);
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfShouldBeSentCorrectly() {
connection.slaveOf("127.0.0.1", 1001);
verifyNativeConnectionInvocation().slaveof(eq("127.0.0.1"), eq(1001));
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfNoOneShouldBeSentCorrectly() {
connection.slaveOfNoOne();
verifyNativeConnectionInvocation().slaveofNoOne();
}
/**
* @see DATAREDIS-330
*/
@Test(expected = InvalidDataAccessResourceUsageException.class)
@Test(expected = InvalidDataAccessResourceUsageException.class) // DATAREDIS-330
public void shouldThrowExceptionWhenAccessingRedisSentinelsCommandsWhenNoSentinelsConfigured() {
connection.getSentinelConnection();
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void restoreShouldThrowExceptionWhenTtlInMillisExceedsIntegerRange() {
connection.restore("foo".getBytes(), new Long(Integer.MAX_VALUE) + 1L, "bar".getBytes());
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void setExShouldThrowExceptionWhenTimeExceedsIntegerRange() {
connection.setEx("foo".getBytes(), new Long(Integer.MAX_VALUE) + 1L, "bar".getBytes());
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void getRangeShouldThrowExceptionWhenStartExceedsIntegerRange() {
connection.getRange("foo".getBytes(), new Long(Integer.MAX_VALUE) + 1L, Integer.MAX_VALUE);
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void getRangeShouldThrowExceptionWhenEndExceedsIntegerRange() {
connection.getRange("foo".getBytes(), Integer.MAX_VALUE, new Long(Integer.MAX_VALUE) + 1L);
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void sRandMemberShouldThrowExceptionWhenCountExceedsIntegerRange() {
connection.sRandMember("foo".getBytes(), new Long(Integer.MAX_VALUE) + 1L);
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void zRangeByScoreShouldThrowExceptionWhenOffsetExceedsIntegerRange() {
connection.zRangeByScore("foo".getBytes(), "foo", "bar", new Long(Integer.MAX_VALUE) + 1L, Integer.MAX_VALUE);
}
/**
* @see DATAREDIS-472
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-472
public void zRangeByScoreShouldThrowExceptionWhenCountExceedsIntegerRange() {
connection.zRangeByScore("foo".getBytes(), "foo", "bar", Integer.MAX_VALUE, new Long(Integer.MAX_VALUE) + 1L);
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void scanShouldKeepTheConnectionOpen() {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).scan(anyString(),
@@ -228,10 +177,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, never()).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void scanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).scan(anyString(),
@@ -243,10 +189,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, times(1)).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void sScanShouldKeepTheConnectionOpen() {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).sscan(any(byte[].class),
@@ -257,10 +200,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, never()).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void sScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).sscan(any(byte[].class),
@@ -272,10 +212,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, times(1)).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void zScanShouldKeepTheConnectionOpen() {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).zscan(any(byte[].class),
@@ -286,10 +223,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, never()).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void zScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).zscan(any(byte[].class),
@@ -301,10 +235,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, times(1)).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void hScanShouldKeepTheConnectionOpen() {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).hscan(any(byte[].class),
@@ -315,10 +246,7 @@ public class JedisConnectionUnitTestSuite {
verify(jedisSpy, never()).quit();
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void hScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
doReturn(new ScanResult<String>("0", Collections.<String> emptyList())).when(jedisSpy).hscan(any(byte[].class),
@@ -340,118 +268,76 @@ public class JedisConnectionUnitTestSuite {
connection.openPipeline();
}
/**
* @see DATAREDIS-184
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-184
public void shutdownNosaveShouldBeSentCorrectlyUsingLuaScript() {
super.shutdownNosaveShouldBeSentCorrectlyUsingLuaScript();
}
/**
* @see DATAREDIS-184
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-184
public void shutdownSaveShouldBeSentCorrectlyUsingLuaScript() {
super.shutdownSaveShouldBeSentCorrectlyUsingLuaScript();
}
/**
* @see DATAREDIS-267
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-267
public void killClientShouldDelegateCallCorrectly() {
super.killClientShouldDelegateCallCorrectly();
}
/**
* @see DATAREDIS-270
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
super.getClientNameShouldSendRequestCorrectly();
}
/**
* @see DATAREDIS-277
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-277
public void slaveOfShouldBeSentCorrectly() {
super.slaveOfShouldBeSentCorrectly();
}
/**
* @see DATAREDIS-277
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-277
public void slaveOfNoOneShouldBeSentCorrectly() {
super.slaveOfNoOneShouldBeSentCorrectly();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void scanShouldKeepTheConnectionOpen() {
super.scanShouldKeepTheConnectionOpen();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void scanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
super.scanShouldCloseTheConnectionWhenCursorIsClosed();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void sScanShouldKeepTheConnectionOpen() {
super.sScanShouldKeepTheConnectionOpen();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void sScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
super.sScanShouldCloseTheConnectionWhenCursorIsClosed();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void zScanShouldKeepTheConnectionOpen() {
super.zScanShouldKeepTheConnectionOpen();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void zScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
super.zScanShouldCloseTheConnectionWhenCursorIsClosed();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void hScanShouldKeepTheConnectionOpen() {
super.hScanShouldKeepTheConnectionOpen();
}
/**
* @see DATAREDIS-531
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-531
public void hScanShouldCloseTheConnectionWhenCursorIsClosed() throws IOException {
super.hScanShouldCloseTheConnectionWhenCursorIsClosed();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,26 +41,17 @@ public class JedisConvertersUnitTests {
private static final String CLIENT_ALL_SINGLE_LINE_RESPONSE = "addr=127.0.0.1:60311 fd=6 name= age=4059 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client";
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingEmptyStringToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(JedisConverters.toListOfRedisClientInformation(""), equalTo(Collections.<RedisClientInfo> emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingNullToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(JedisConverters.toListOfRedisClientInformation(null), equalTo(Collections.<RedisClientInfo> emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingMultipleLiesToListOfRedisClientInfoReturnsListCorrectly() {
StringBuilder sb = new StringBuilder();
@@ -71,10 +62,7 @@ public class JedisConvertersUnitTests {
assertThat(JedisConverters.toListOfRedisClientInformation(sb.toString()).size(), equalTo(2));
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void convertsSingleMapToRedisServerReturnsCollectionCorrectly() {
Map<String, String> values = getRedisServerInfoMap("mymaster", 23697);
@@ -84,10 +72,7 @@ public class JedisConvertersUnitTests {
verifyRedisServerInfo(servers.get(0), values);
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void convertsMultipleMapsToRedisServerReturnsCollectionCorrectly() {
List<Map<String, String>> vals = Arrays.asList(getRedisServerInfoMap("mymaster", 23697),
@@ -100,18 +85,12 @@ public class JedisConvertersUnitTests {
}
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void convertsRedisServersCorrectlyWhenGivenAnEmptyList() {
assertThat(JedisConverters.toListOfRedisServer(Collections.<Map<String, String>> emptyList()), notNullValue());
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void convertsRedisServersCorrectlyWhenGivenNull() {
assertThat(JedisConverters.toListOfRedisServer(null), notNullValue());
}
@@ -126,10 +105,7 @@ public class JedisConvertersUnitTests {
assertThat(JedisConverters.boundaryToBytesForZRangeByLex(null, defaultValue), is(defaultValue));
}
/**
* @see DATAREDIS-378
*/
@Test
@Test // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldReturnDefaultValueWhenBoundaryValueIsNull() {
byte[] defaultValue = "tyrion".getBytes();
@@ -138,10 +114,7 @@ public class JedisConvertersUnitTests {
is(defaultValue));
}
/**
* @see DATAREDIS-378
*/
@Test
@Test // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldReturnValueCorrectlyWhenBoundaryIsIncluing() {
assertThat(
@@ -149,10 +122,7 @@ public class JedisConvertersUnitTests {
is(JedisConverters.toBytes("[a")));
}
/**
* @see DATAREDIS-378
*/
@Test
@Test // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldReturnValueCorrectlyWhenBoundaryIsExcluding() {
assertThat(
@@ -160,38 +130,26 @@ public class JedisConvertersUnitTests {
is(JedisConverters.toBytes("(a")));
}
/**
* @see DATAREDIS-378
*/
@Test
@Test // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldReturnValueCorrectlyWhenBoundaryIsAString() {
assertThat(JedisConverters.boundaryToBytesForZRangeByLex(Range.range().gt("a").getMin(), null),
is(JedisConverters.toBytes("(a")));
}
/**
* @see DATAREDIS-378
*/
@Test
@Test // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldReturnValueCorrectlyWhenBoundaryIsANumber() {
assertThat(JedisConverters.boundaryToBytesForZRangeByLex(Range.range().gt(1L).getMin(), null),
is(JedisConverters.toBytes("(1")));
}
/**
* @see DATAREDIS-378
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-378
public void boundaryToBytesForZRangeByLexShouldThrowExceptionWhenBoundaryHoldsUnknownType() {
JedisConverters.boundaryToBytesForZRangeByLex(Range.range().gt(new Date()).getMin(), null);
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnDefaultValueWhenBoundaryIsNull() {
byte[] defaultValue = "tyrion".getBytes();
@@ -199,10 +157,7 @@ public class JedisConvertersUnitTests {
assertThat(JedisConverters.boundaryToBytesForZRange(null, defaultValue), is(defaultValue));
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnDefaultValueWhenBoundaryValueIsNull() {
byte[] defaultValue = "tyrion".getBytes();
@@ -210,10 +165,7 @@ public class JedisConvertersUnitTests {
assertThat(JedisConverters.boundaryToBytesForZRange(Range.unbounded().getMax(), defaultValue), is(defaultValue));
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnValueCorrectlyWhenBoundaryIsIncluing() {
assertThat(
@@ -221,90 +173,60 @@ public class JedisConvertersUnitTests {
is(JedisConverters.toBytes("a")));
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnValueCorrectlyWhenBoundaryIsExcluding() {
assertThat(JedisConverters.boundaryToBytesForZRange(Range.range().gt(JedisConverters.toBytes("a")).getMin(), null),
is(JedisConverters.toBytes("(a")));
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnValueCorrectlyWhenBoundaryIsAString() {
assertThat(JedisConverters.boundaryToBytesForZRange(Range.range().gt("a").getMin(), null),
is(JedisConverters.toBytes("(a")));
}
/**
* @see DATAREDIS-352
*/
@Test
@Test // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldReturnValueCorrectlyWhenBoundaryIsANumber() {
assertThat(JedisConverters.boundaryToBytesForZRange(Range.range().gt(1L).getMin(), null),
is(JedisConverters.toBytes("(1")));
}
/**
* @see DATAREDIS-352
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-352
public void boundaryToBytesForZRangeByShouldThrowExceptionWhenBoundaryHoldsUnknownType() {
JedisConverters.boundaryToBytesForZRange(Range.range().gt(new Date()).getMin(), null);
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandExPxOptionShouldReturnEXforSeconds() {
assertThat(JedisConverters.toSetCommandExPxArgument(Expiration.seconds(100)), equalTo(JedisConverters.toBytes("EX")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandExPxOptionShouldReturnEXforMilliseconds() {
assertThat(JedisConverters.toSetCommandExPxArgument(Expiration.milliseconds(100)),
equalTo(JedisConverters.toBytes("PX")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandExPxOptionShouldReturnEmptyArrayForNull() {
assertThat(JedisConverters.toSetCommandExPxArgument(null), equalTo(new byte[] {}));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandNxXxOptionShouldReturnNXforAbsent() {
assertThat(JedisConverters.toSetCommandNxXxArgument(SetOption.ifAbsent()), equalTo(JedisConverters.toBytes("NX")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandNxXxOptionShouldReturnXXforAbsent() {
assertThat(JedisConverters.toSetCommandNxXxArgument(SetOption.ifPresent()), equalTo(JedisConverters.toBytes("XX")));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetCommandNxXxOptionShouldReturnEmptyArrayforUpsert() {
assertThat(JedisConverters.toSetCommandNxXxArgument(SetOption.upsert()), equalTo(new byte[] {}));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,10 +42,7 @@ public class JedisExceptionConverterUnitTests {
converter = new JedisExceptionConverter();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldConvertMovedDataException() {
DataAccessException converted = converter.convert(new JedisMovedDataException("MOVED 3999 127.0.0.1:6381",
@@ -57,10 +54,7 @@ public class JedisExceptionConverterUnitTests {
assertThat(((ClusterRedirectException) converted).getTargetPort(), is(6381));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldConvertAskDataException() {
DataAccessException converted = converter.convert(new JedisAskDataException("ASK 3999 127.0.0.1:6381",
@@ -72,10 +66,7 @@ public class JedisExceptionConverterUnitTests {
assertThat(((ClusterRedirectException) converted).getTargetPort(), is(6381));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldConvertMaxRedirectException() {
DataAccessException converted = converter

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,19 +44,13 @@ public class JedisSentinelConnectionUnitTests {
this.connection = new JedisSentinelConnection(jedisMock);
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldConnectAfterCreation() {
verify(jedisMock, times(1)).connect();
}
/**
* @see DATAREDIS-330
*/
@SuppressWarnings("resource")
@Test
@Test // DATAREDIS-330
public void shouldNotConnectIfAlreadyConnected() {
Jedis yetAnotherJedisMock = mock(Jedis.class);
@@ -67,124 +61,82 @@ public class JedisSentinelConnectionUnitTests {
verify(yetAnotherJedisMock, never()).connect();
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void failoverShouldBeSentCorrectly() {
connection.failover(new RedisNodeBuilder().withName("mymaster").build());
verify(jedisMock, times(1)).sentinelFailover(eq("mymaster"));
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void failoverShouldThrowExceptionIfMasterNodeIsNull() {
connection.failover(null);
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void failoverShouldThrowExceptionIfMasterNodeNameIsEmpty() {
connection.failover(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void mastersShouldReadMastersCorrectly() {
connection.masters();
verify(jedisMock, times(1)).sentinelMasters();
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldReadSlavesCorrectly() {
connection.slaves("mymaster");
verify(jedisMock, times(1)).sentinelSlaves(eq("mymaster"));
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldReadSlavesCorrectlyWhenGivenNamedNode() {
connection.slaves(new RedisNodeBuilder().withName("mymaster").build());
verify(jedisMock, times(1)).sentinelSlaves(eq("mymaster"));
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void readSlavesShouldThrowExceptionWhenGivenEmptyMasterName() {
connection.slaves("");
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void readSlavesShouldThrowExceptionWhenGivenNull() {
connection.slaves((RedisNode) null);
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void readSlavesShouldThrowExceptionWhenNodeWithoutName() {
connection.slaves(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldRemoveMasterCorrectlyWhenGivenNamedNode() {
connection.remove(new RedisNodeBuilder().withName("mymaster").build());
verify(jedisMock, times(1)).sentinelRemove(eq("mymaster"));
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void removeShouldThrowExceptionWhenGivenEmptyMasterName() {
connection.remove("");
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void removeShouldThrowExceptionWhenGivenNull() {
connection.remove((RedisNode) null);
}
/**
* @see DATAREDIS-330
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-330
public void removeShouldThrowExceptionWhenNodeWithoutName() {
connection.remove(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void monitorShouldBeSentCorrectly() {
RedisServer server = new RedisServer("127.0.0.1", 6382);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -127,10 +127,7 @@ public class JedisSentinelIntegrationTests extends AbstractConnectionIntegration
super.testErrorInTx();
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldReadMastersCorrectly() {
List<RedisServer> servers = (List<RedisServer>) connectionFactory.getSentinelConnection().masters();
@@ -138,10 +135,7 @@ public class JedisSentinelIntegrationTests extends AbstractConnectionIntegration
assertThat(servers.get(0).getName(), is(MASTER_NAME));
}
/**
* @see DATAREDIS-330
*/
@Test
@Test // DATAREDIS-330
public void shouldReadSlavesOfMastersCorrectly() {
RedisSentinelConnection sentinelConnection = connectionFactory.getSentinelConnection();
@@ -154,10 +148,7 @@ public class JedisSentinelIntegrationTests extends AbstractConnectionIntegration
assertThat(slaves, hasItems(SLAVE_0, SLAVE_1));
}
/**
* @see DATAREDIS-552
*/
@Test
@Test // DATAREDIS-552
public void shouldSetClientName() {
RedisSentinelConnection sentinelConnection = connectionFactory.getSentinelConnection();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,37 +50,25 @@ public class JedisTransactionalConnectionStarvationTest extends AbstractTransact
}
}
/**
* @see DATAREDIS-332
*/
@Test
@Test // DATAREDIS-332
@Rollback
public void testNumberOfOperationsIsOne() {
tryOperations(1);
}
/**
* @see DATAREDIS-332
*/
@Test
@Test // DATAREDIS-332
@Rollback
public void testNumberOfOperationsEqualToNumberOfConnections() {
tryOperations(MAX_CONNECTIONS);
}
/**
* @see DATAREDIS-332
*/
@Test
@Test // DATAREDIS-332
@Rollback
public void testNumberOfOperationsGreaterThanNumberOfConnections() {
tryOperations(MAX_CONNECTIONS + 1);
}
/**
* @see DATAREDIS-548
*/
@Test
@Test // DATAREDIS-548
@Transactional(readOnly = true)
public void readonlyTransactionSyncShouldNotExcceedMaxConnections() {
tryOperations(MAX_CONNECTIONS + 1);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -349,10 +349,7 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
super.testPTtlNoExpire();
}
/**
* @see DATAREDIS-526
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-526
public void testPTtlWithTimeUnit() {
super.testPTtlWithTimeUnit();
}
@@ -788,18 +785,12 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
}
}
/**
* @see DATAREDIS-206
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-206
public void testGetTimeShouldRequestServerTime() {
super.testGetTimeShouldRequestServerTime();
}
/**
* @see DATAREDIS-285
*/
@Test
@Test // DATAREDIS-285
public void testExecuteShouldConvertArrayReplyCorrectly() {
connection.set("spring", "awesome");
connection.set("data", "cool");
@@ -816,28 +807,19 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
"supercalifragilisticexpialidocious".getBytes()));
}
/**
* @see DATAREDIS-271
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-271
public void testPsetEx() throws Exception {
super.testPsetEx();
}
/**
* @see DATAREDIS-269
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-269
public void clientSetNameWorksCorrectly() {
super.clientSetNameWorksCorrectly();
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,34 +33,22 @@ public class JRedisConnectionUnitTests extends AbstractConnectionUnitTestBase<JR
connection = new JredisConnection(getNativeRedisConnectionMock());
}
/**
* @see DATAREDIS-184
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-184
public void shutdownSaveShouldThrowUnsupportedOperationException() {
connection.shutdown(ShutdownOption.SAVE);
}
/**
* @see DATAREDIS-184
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-184
public void shutdownNosaveShouldThrowUnsupportedOperationException() {
connection.shutdown(ShutdownOption.NOSAVE);
}
/**
* @see DATAREDIS-184
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-184
public void shutdownWithNullShouldThrowUnsupportedOperationException() {
connection.shutdown(null);
}
/**
* @see DATAREDIS-270
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -205,10 +205,7 @@ public class DefaultLettucePoolTests {
pool.getResource();
}
/**
* @see DATAREDIS-524
*/
@Test
@Test // DATAREDIS-524
public void testCreateSentinelWithPassword() {
pool = new DefaultLettucePool(new RedisSentinelConfiguration("mymaster", Collections.singleton("host:1234")));
@@ -221,10 +218,7 @@ public class DefaultLettucePoolTests {
assertThat(redisUri.getPassword(), is(equalTo(pool.getPassword().toCharArray())));
}
/**
* @see DATAREDIS-462
*/
@Test
@Test // DATAREDIS-462
public void poolWorksWithoutClientResources() {
pool = new DefaultLettucePool(SettingsUtils.getHost(), SettingsUtils.getPort());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -122,18 +122,12 @@ public class LettuceClusterConnectionUnitTests {
};
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void thowsExceptionWhenClusterCommandExecturorIsNull() {
new LettuceClusterConnection(clusterMock, null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterMeetShouldSendCommandsToExistingNodesCorrectly() {
connection.clusterMeet(UNKNOWN_CLUSTER_NODE);
@@ -146,18 +140,12 @@ public class LettuceClusterConnectionUnitTests {
UNKNOWN_CLUSTER_NODE.getPort());
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void clusterMeetShouldThrowExceptionWhenNodeIsNull() {
connection.clusterMeet(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterForgetShouldSendCommandsToRemainingNodesCorrectly() {
connection.clusterForget(CLUSTER_NODE_2);
@@ -167,10 +155,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection3Mock, times(1)).clusterForget(CLUSTER_NODE_2.getId());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterReplicateShouldSendCommandsCorrectly() {
connection.clusterReplicate(CLUSTER_NODE_1, CLUSTER_NODE_2);
@@ -179,10 +164,7 @@ public class LettuceClusterConnectionUnitTests {
verifyZeroInteractions(clusterConnection1Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void closeShouldNotCloseUnderlyingClusterPool() throws IOException {
connection.close();
@@ -190,10 +172,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterMock, never()).shutdown();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void isClosedShouldReturnConnectionStateCorrectly() {
assertThat(connection.isClosed(), is(false));
@@ -203,10 +182,7 @@ public class LettuceClusterConnectionUnitTests {
assertThat(connection.isClosed(), is(true));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void keysShouldBeRunOnAllClusterNodes() {
when(clusterConnection1Mock.keys(any(byte[].class))).thenReturn(Collections.<byte[]>emptyList());
@@ -222,10 +198,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection3Mock, times(1)).keys(pattern);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void keysShouldOnlyBeRunOnDedicatedNodeWhenPinned() {
when(clusterConnection2Mock.keys(any(byte[].class))).thenReturn(Collections.<byte[]>emptyList());
@@ -239,10 +212,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection3Mock, never()).keys(pattern);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void randomKeyShouldReturnAnyKeyFromRandomNode() {
when(clusterConnection1Mock.randomkey()).thenReturn(KEY_1_BYTES);
@@ -254,10 +224,7 @@ public class LettuceClusterConnectionUnitTests {
clusterConnection3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void randomKeyShouldReturnKeyWhenAvailableOnAnyNode() {
when(clusterConnection3Mock.randomkey()).thenReturn(KEY_3_BYTES);
@@ -267,10 +234,7 @@ public class LettuceClusterConnectionUnitTests {
}
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void randomKeyShouldReturnNullWhenNoKeysPresentOnAllNodes() {
when(clusterConnection1Mock.randomkey()).thenReturn(null);
@@ -280,10 +244,7 @@ public class LettuceClusterConnectionUnitTests {
assertThat(connection.randomKey(), nullValue());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotImportingShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.IMPORTING);
@@ -291,10 +252,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection1Mock, times(1)).clusterSetSlotImporting(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotMigratingShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.MIGRATING);
@@ -302,10 +260,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection1Mock, times(1)).clusterSetSlotMigrating(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotStableShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.STABLE);
@@ -313,10 +268,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection1Mock, times(1)).clusterSetSlotStable(eq(100));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotNodeShouldBeExecutedCorrectly() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, AddSlots.NODE);
@@ -324,10 +276,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection1Mock, times(1)).clusterSetSlotNode(eq(100), eq(CLUSTER_NODE_1.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterSetSlotShouldBeExecutedOnTargetNodeWhenNodeIdNotSet() {
connection.clusterSetSlot(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT), 100, AddSlots.IMPORTING);
@@ -335,18 +284,12 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection2Mock, times(1)).clusterSetSlotImporting(eq(100), eq(CLUSTER_NODE_2.getId()));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void clusterSetSlotShouldThrowExceptionWhenModeIsNull() {
connection.clusterSetSlot(CLUSTER_NODE_1, 100, null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void clusterDeleteSlotsShouldBeExecutedCorrectly() {
int[] slots = new int[] { 9000, 10000 };
@@ -355,18 +298,12 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection2Mock, times(1)).clusterDelSlots((int[]) anyVararg());
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void clusterDeleteSlotShouldThrowExceptionWhenNodeIsNull() {
connection.clusterDeleteSlots(null, new int[] { 1 });
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void timeShouldBeExecutedOnArbitraryNode() {
List<byte[]> values = Arrays.asList("1449655759".getBytes(), "92217".getBytes());
@@ -379,10 +316,7 @@ public class LettuceClusterConnectionUnitTests {
verifyInvocationsAcross("time", times(1), clusterConnection1Mock, clusterConnection2Mock, clusterConnection3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void timeShouldBeExecutedOnSingleNode() {
when(clusterConnection2Mock.time()).thenReturn(Arrays.asList("1449655759".getBytes(), "92217".getBytes()));
@@ -393,10 +327,7 @@ public class LettuceClusterConnectionUnitTests {
verifyZeroInteractions(clusterConnection1Mock, clusterConnection3Mock);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void resetConfigStatsShouldBeExecutedOnAllNodes() {
connection.resetConfigStats();
@@ -406,10 +337,7 @@ public class LettuceClusterConnectionUnitTests {
verify(clusterConnection3Mock, times(1)).configResetstat();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void resetConfigStatsShouldBeExecutedOnSingleNodeCorrectly() {
connection.resetConfigStats(CLUSTER_NODE_2);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -278,10 +278,7 @@ public class LettuceConnectionFactoryTests {
conn.close();
}
/**
* @see DATAREDIS-431
*/
@Test
@Test // DATAREDIS-431
public void dbIndexShouldBePropagatedCorrectly() {
LettuceConnectionFactory factory = new LettuceConnectionFactory();
@@ -305,10 +302,7 @@ public class LettuceConnectionFactoryTests {
}
}
/**
* @see DATAREDIS-462
*/
@Test
@Test // DATAREDIS-462
public void factoryWorksWithoutClientResources() {
LettuceConnectionFactory factory = new LettuceConnectionFactory();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,10 +57,7 @@ public class LettuceConnectionFactoryUnitTests {
ConnectionFactoryTracker.cleanUp();
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shouldInitClientCorrectlyWhenClusterConfigPresent() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(clusterConfig);
@@ -71,10 +68,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(getField(connectionFactory, "client"), instanceOf(RedisClusterClient.class));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
@SuppressWarnings("unchecked")
public void timeoutShouldBeSetCorrectlyOnClusterClient() {
@@ -95,10 +89,7 @@ public class LettuceConnectionFactoryUnitTests {
}
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
@SuppressWarnings("unchecked")
public void passwordShouldBeSetCorrectlyOnClusterClient() {
@@ -118,10 +109,7 @@ public class LettuceConnectionFactoryUnitTests {
}
}
/**
* @see DATAREDIS-524
*/
@Test
@Test // DATAREDIS-524
public void passwordShouldBeSetCorrectlyOnSentinelClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(
@@ -139,10 +127,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(redisUri.getPassword(), is(equalTo(connectionFactory.getPassword().toCharArray())));
}
/**
* @see DATAREDIS-462
*/
@Test
@Test // DATAREDIS-462
public void clusterClientShouldInitializeWithoutClientResources() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(clusterConfig);
@@ -154,10 +139,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(client, instanceOf(RedisClusterClient.class));
}
/**
* @see DATAREDIS-480
*/
@Test
@Test // DATAREDIS-480
public void sslOptionsShouldBeDisabledByDefaultOnClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
@@ -178,10 +160,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(connectionFactory.isVerifyPeer(), is(true));
}
/**
* @see DATAREDIS-476
*/
@Test
@Test // DATAREDIS-476
public void sslShouldBeSetCorrectlyOnClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
@@ -201,10 +180,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(connectionFactory.isVerifyPeer(), is(true));
}
/**
* @see DATAREDIS-480
*/
@Test
@Test // DATAREDIS-480
public void verifyPeerOptionShouldBeSetCorrectlyOnClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
@@ -222,10 +198,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(connectionFactory.isVerifyPeer(), is(false));
}
/**
* @see DATAREDIS-480
*/
@Test
@Test // DATAREDIS-480
public void startTLSOptionShouldBeSetCorrectlyOnClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
@@ -243,10 +216,7 @@ public class LettuceConnectionFactoryUnitTests {
assertThat(connectionFactory.isStartTls(), is(true));
}
/**
* @see DATAREDIS-537
*/
@Test
@Test // DATAREDIS-537
public void sslShouldBeSetCorrectlyOnClusterClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(
@@ -266,10 +236,7 @@ public class LettuceConnectionFactoryUnitTests {
}
}
/**
* @see DATAREDIS-537
*/
@Test
@Test // DATAREDIS-537
public void startTLSOptionShouldBeSetCorrectlyOnClusterClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(
@@ -289,10 +256,7 @@ public class LettuceConnectionFactoryUnitTests {
}
}
/**
* @see DATAREDIS-537
*/
@Test
@Test // DATAREDIS-537
public void verifyPeerTLSOptionShouldBeSetCorrectlyOnClusterClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -298,11 +298,8 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
}
}
/**
* @see DATAREDIS-285
*/
@SuppressWarnings("unchecked")
@Test
@Test // DATAREDIS-285
public void testExecuteShouldConvertArrayReplyCorrectly() {
connection.set("spring", "awesome");
@@ -329,10 +326,7 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
Arrays.asList(new Object[] { new String(scriptResults.get(0)), new String(scriptResults.get(1)) }));
}
/**
* @see DATAREDIS-106
*/
@Test
@Test // DATAREDIS-106
public void zRangeByScoreTest() {
connection.zAdd("myzset", 1, "one");
@@ -344,10 +338,7 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
assertEquals("two", new String(zRangeByScore.iterator().next()));
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
@RequiresRedisSentinel(RedisSentinelRule.SentinelsAvailable.ONE_ACTIVE)
public void shouldReturnSentinelCommandsWhenWhenActiveSentinelFound() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -110,11 +110,8 @@ public class LettuceConnectionPipelineIntegrationTests extends AbstractConnectio
}
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,11 +83,8 @@ public class LettuceConnectionPipelineTxIntegrationTests extends LettuceConnecti
return txResults;
}
/**
* @see DATAREDIS-268
*/
@Override
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,40 +70,28 @@ public class LettuceConnectionUnitTestSuite {
connection = new LettuceConnection(0, clientMock);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNullOptionsIsCalledCorrectly() {
connection.shutdown(null);
verify(syncCommandsMock, times(1)).shutdown(true);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNosaveOptionIsCalledCorrectly() {
connection.shutdown(ShutdownOption.NOSAVE);
verify(syncCommandsMock, times(1)).shutdown(false);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithSaveOptionIsCalledCorrectly() {
connection.shutdown(ShutdownOption.SAVE);
verify(syncCommandsMock, times(1)).shutdown(true);
}
/**
* @see DATAREDIS-267
*/
@Test
@Test // DATAREDIS-267
public void killClientShouldDelegateCallCorrectly() {
String ipPort = "127.0.0.1:1001";
@@ -111,56 +99,38 @@ public class LettuceConnectionUnitTestSuite {
verify(syncCommandsMock, times(1)).clientKill(eq(ipPort));
}
/**
* @see DATAREDIS-270
*/
@Test
@Test // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();
verify(syncCommandsMock, times(1)).clientGetname();
}
/**
* @see DATAREDIS-277
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-277
public void slaveOfShouldThrowExectpionWhenCalledForNullHost() {
connection.slaveOf(null, 0);
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfShouldBeSentCorrectly() {
connection.slaveOf("127.0.0.1", 1001);
verify(syncCommandsMock, times(1)).slaveof(eq("127.0.0.1"), eq(1001));
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfNoOneShouldBeSentCorrectly() {
connection.slaveOfNoOne();
verify(syncCommandsMock, times(1)).slaveofNoOne();
}
/**
* @see DATAREDIS-348
*/
@Test(expected = InvalidDataAccessResourceUsageException.class)
@Test(expected = InvalidDataAccessResourceUsageException.class) // DATAREDIS-348
public void shouldThrowExceptionWhenAccessingRedisSentinelsCommandsWhenNoSentinelsConfigured() {
connection.getSentinelConnection();
}
/**
* @see DATAREDIS-431
*/
@Test
@Test // DATAREDIS-431
public void dbIndexShouldBeSetWhenObtainingConnection() {
connection = new LettuceConnection(null, 0, clientMock, null, 1);
@@ -179,50 +149,35 @@ public class LettuceConnectionUnitTestSuite {
this.connection.openPipeline();
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void shutdownWithSaveOptionIsCalledCorrectly() {
connection.shutdown(ShutdownOption.SAVE);
verify(asyncCommandsMock, times(1)).shutdown(true);
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void shutdownWithNosaveOptionIsCalledCorrectly() {
connection.shutdown(ShutdownOption.NOSAVE);
verify(asyncCommandsMock, times(1)).shutdown(false);
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void slaveOfShouldBeSentCorrectly() {
connection.slaveOf("127.0.0.1", 1001);
verify(asyncCommandsMock, times(1)).slaveof(eq("127.0.0.1"), eq(1001));
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void shutdownWithNullOptionsIsCalledCorrectly() {
connection.shutdown(null);
verify(asyncCommandsMock, times(1)).shutdown(true);
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void killClientShouldDelegateCallCorrectly() {
String ipPort = "127.0.0.1:1001";
@@ -230,20 +185,14 @@ public class LettuceConnectionUnitTestSuite {
verify(asyncCommandsMock, times(1)).clientKill(eq(ipPort));
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void slaveOfNoOneShouldBeSentCorrectly() {
connection.slaveOfNoOne();
verify(asyncCommandsMock, times(1)).slaveofNoOne();
}
/**
* @see DATAREDIS-528
*/
@Test
@Test // DATAREDIS-528
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,27 +48,18 @@ public class LettuceConvertersUnitTests {
private static final String CLIENT_ALL_SINGLE_LINE_RESPONSE = "addr=127.0.0.1:60311 fd=6 name= age=4059 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client";
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingEmptyStringToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(LettuceConverters.toListOfRedisClientInformation(""), equalTo(Collections.<RedisClientInfo>emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingNullToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(LettuceConverters.toListOfRedisClientInformation(null),
equalTo(Collections.<RedisClientInfo>emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingMultipleLiesToListOfRedisClientInfoReturnsListCorrectly() {
StringBuilder sb = new StringBuilder();
@@ -79,18 +70,12 @@ public class LettuceConvertersUnitTests {
assertThat(LettuceConverters.toListOfRedisClientInformation(sb.toString()).size(), equalTo(2));
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void partitionsToClusterNodesShouldReturnEmptyCollectionWhenPartionsDoesNotContainElements() {
assertThat(LettuceConverters.partitionsToClusterNodes(new Partitions()), notNullValue());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void partitionsToClusterNodesShouldConvertPartitionCorrctly() {
Partitions partitions = new Partitions();
@@ -116,10 +101,7 @@ public class LettuceConvertersUnitTests {
assertThat(node.getSlotRange().getSlots(), hasItems(1, 2, 3, 4, 5));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldReturnEmptyArgsForNullValues() {
SetArgs args = LettuceConverters.toSetArgs(null, null);
@@ -130,10 +112,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.FALSE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldNotSetExOrPxForPersistent() {
SetArgs args = LettuceConverters.toSetArgs(Expiration.persistent(), null);
@@ -144,10 +123,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.FALSE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldSetExForSeconds() {
SetArgs args = LettuceConverters.toSetArgs(Expiration.seconds(10), null);
@@ -158,10 +134,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.FALSE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldSetPxForMilliseconds() {
SetArgs args = LettuceConverters.toSetArgs(Expiration.milliseconds(100), null);
@@ -172,10 +145,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.FALSE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldSetNxForAbsent() {
SetArgs args = LettuceConverters.toSetArgs(null, SetOption.ifAbsent());
@@ -186,10 +156,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.FALSE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldSetXxForPresent() {
SetArgs args = LettuceConverters.toSetArgs(null, SetOption.ifPresent());
@@ -200,10 +167,7 @@ public class LettuceConvertersUnitTests {
assertThat((Boolean) getField(args, "xx"), is(Boolean.TRUE));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void toSetArgsShouldNotSetNxOrXxForUpsert() {
SetArgs args = LettuceConverters.toSetArgs(null, SetOption.upsert());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,44 +62,29 @@ public class LettuceSentinelConnectionUnitTests {
this.connection = new LettuceSentinelConnection(redisClientMock);
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldConnectAfterCreation() {
verify(redisClientMock, times(1)).connectSentinel();
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void failoverShouldBeSentCorrectly() {
connection.failover(new RedisNodeBuilder().withName(MASTER_ID).build());
verify(sentinelCommandsMock, times(1)).failover(eq(MASTER_ID));
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void failoverShouldThrowExceptionIfMasterNodeIsNull() {
connection.failover(null);
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void failoverShouldThrowExceptionIfMasterNodeNameIsEmpty() {
connection.failover(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void mastersShouldReadMastersCorrectly() {
when(sentinelCommandsMock.masters()).thenReturn(Collections.<Map<String, String>>emptyList());
@@ -107,10 +92,7 @@ public class LettuceSentinelConnectionUnitTests {
verify(sentinelCommandsMock, times(1)).masters();
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldReadSlavesCorrectly() {
when(sentinelCommandsMock.slaves(MASTER_ID)).thenReturn(Collections.<Map<String, String>>emptyList());
@@ -118,10 +100,7 @@ public class LettuceSentinelConnectionUnitTests {
verify(sentinelCommandsMock, times(1)).slaves(eq(MASTER_ID));
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldReadSlavesCorrectlyWhenGivenNamedNode() {
when(sentinelCommandsMock.slaves(MASTER_ID)).thenReturn(Collections.<Map<String, String>>emptyList());
@@ -129,68 +108,44 @@ public class LettuceSentinelConnectionUnitTests {
verify(sentinelCommandsMock, times(1)).slaves(eq(MASTER_ID));
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void readSlavesShouldThrowExceptionWhenGivenEmptyMasterName() {
connection.slaves("");
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void readSlavesShouldThrowExceptionWhenGivenNull() {
connection.slaves((RedisNode) null);
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void readSlavesShouldThrowExceptionWhenNodeWithoutName() {
connection.slaves(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldRemoveMasterCorrectlyWhenGivenNamedNode() {
connection.remove(new RedisNodeBuilder().withName(MASTER_ID).build());
verify(sentinelCommandsMock, times(1)).remove(eq(MASTER_ID));
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void removeShouldThrowExceptionWhenGivenEmptyMasterName() {
connection.remove("");
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void removeShouldThrowExceptionWhenGivenNull() {
connection.remove((RedisNode) null);
}
/**
* @see DATAREDIS-348
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-348
public void removeShouldThrowExceptionWhenNodeWithoutName() {
connection.remove(new RedisNodeBuilder().build());
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void monitorShouldBeSentCorrectly() {
RedisServer server = new RedisServer("127.0.0.1", 6382);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,10 +77,7 @@ public class LettuceSentinelIntegrationTests extends AbstractConnectionIntegrati
((LettuceConnectionFactory) connectionFactory).destroy();
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldReadMastersCorrectly() {
List<RedisServer> servers = (List<RedisServer>) connectionFactory.getSentinelConnection().masters();
@@ -88,10 +85,7 @@ public class LettuceSentinelIntegrationTests extends AbstractConnectionIntegrati
assertThat(servers.get(0).getName(), is(MASTER_NAME));
}
/**
* @see DATAREDIS-348
*/
@Test
@Test // DATAREDIS-348
public void shouldReadSlavesOfMastersCorrectly() {
RedisSentinelConnection sentinelConnection = connectionFactory.getSentinelConnection();
@@ -104,10 +98,7 @@ public class LettuceSentinelIntegrationTests extends AbstractConnectionIntegrati
assertThat(slaves, hasItems(SLAVE_0, SLAVE_1));
}
/**
* @see DATAREDIS-462
*/
@Test
@Test // DATAREDIS-462
public void factoryWorksWithoutClientResources() {
LettuceConnectionFactory factory = new LettuceConnectionFactory(SENTINEL_CONFIG);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -87,10 +87,7 @@ public class SrpConnectionIntegrationTests extends AbstractConnectionIntegration
verifyResults(Arrays.asList(new Object[] { Arrays.asList(new Object[] { "OK", "OK" }) }));
}
/**
* @see DATAREDIS-285
*/
@Test
@Test // DATAREDIS-285
public void testExecuteShouldConvertArrayReplyCorrectly() {
connection.set("spring", "awesome");
connection.set("data", "cool");
@@ -120,10 +117,7 @@ public class SrpConnectionIntegrationTests extends AbstractConnectionIntegration
Arrays.asList(new Object[] { new String(scriptResults.get(0)), new String(scriptResults.get(1)) }));
}
/**
* @see DATAREDIS-106
*/
@Test
@Test // DATAREDIS-106
public void zRangeByScoreTest() {
connection.zAdd("myzset", 1, "one");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2013 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,10 +60,7 @@ public class SrpConnectionTransactionIntegrationTests extends AbstractConnection
super.testZUnionStoreAggWeights();
}
/**
* @see DATAREDIS-268
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-268
public void testListClientsContainsAtLeastOneElement() {
super.testListClientsContainsAtLeastOneElement();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,42 +48,28 @@ public class SrpConnectionUnitTestSuite {
connection = new SrpConnection(getNativeRedisConnectionMock());
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNullOpionsIsCalledCorrectly() {
connection.shutdown(null);
verifyNativeConnectionInvocation().shutdown("SAVE".getBytes(Charsets.UTF_8), null);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithSaveIsCalledCorrectly() {
connection.shutdown(ShutdownOption.SAVE);
verifyNativeConnectionInvocation().shutdown("SAVE".getBytes(Charsets.UTF_8), null);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNosaveIsCalledCorrectly() {
connection.shutdown(ShutdownOption.NOSAVE);
verifyNativeConnectionInvocation().shutdown("NOSAVE".getBytes(Charsets.UTF_8), null);
}
/**
* <<<<<<< HEAD
*
* @see DATAREDIS-267
*/
@Test
@Test // DATAREDIS-267
public void killClientShouldDelegateCallCorrectly() {
String ipPort = "127.0.0.1:1001";
@@ -91,38 +77,26 @@ public class SrpConnectionUnitTestSuite {
verifyNativeConnectionInvocation().client_kill(eq(ipPort));
}
/**
* @see DATAREDIS-270
*/
@Test
@Test // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();
verifyNativeConnectionInvocation().client_getname();
}
/**
* @see DATAREDIS-277
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-277
public void slaveOfShouldThrowExectpionWhenCalledForNullHost() {
connection.slaveOf(null, 0);
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfShouldBeSentCorrectly() {
connection.slaveOf("127.0.0.1", 1001);
verifyNativeConnectionInvocation().slaveof(eq("127.0.0.1"), eq(1001));
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfNoOneShouldBeSentCorrectly() {
connection.slaveOfNoOne();
@@ -144,40 +118,28 @@ public class SrpConnectionUnitTestSuite {
connection.openPipeline();
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNullOpionsIsCalledCorrectly() {
connection.shutdown(null);
verifyNativeConnectionInvocation().shutdown("SAVE".getBytes(Charsets.UTF_8), null);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithSaveIsCalledCorrectly() {
connection.shutdown(ShutdownOption.SAVE);
verifyNativeConnectionInvocation().shutdown("SAVE".getBytes(Charsets.UTF_8), null);
}
/**
* @see DATAREDIS-184
*/
@Test
@Test // DATAREDIS-184
public void shutdownWithNosaveIsCalledCorrectly() {
connection.shutdown(ShutdownOption.NOSAVE);
verifyNativeConnectionInvocation().shutdown("NOSAVE".getBytes(Charsets.UTF_8), null);
}
/**
* @see DATAREDIS-270
*/
@Test
@Test // DATAREDIS-270
public void getClientNameShouldSendRequestCorrectly() {
connection.getClientName();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,36 +35,24 @@ public class SrpConvertersUnitTests {
private static final String CLIENT_ALL_SINGLE_LINE_RESPONSE = "addr=127.0.0.1:60311 fd=6 name= age=4059 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client";
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingNullReplyToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(SrpConverters.toListOfRedisClientInformation(new BulkReply(null)),
equalTo(Collections.<RedisClientInfo> emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingEmptyReplyToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(SrpConverters.toListOfRedisClientInformation(new BulkReply(new byte[0])),
equalTo(Collections.<RedisClientInfo> emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingNullToListOfRedisClientInfoShouldReturnEmptyList() {
assertThat(SrpConverters.toListOfRedisClientInformation(null), equalTo(Collections.<RedisClientInfo> emptyList()));
}
/**
* @see DATAREDIS-268
*/
@Test
@Test // DATAREDIS-268
public void convertingMultipleLiesToListOfRedisClientInfoReturnsListCorrectly() {
StringBuilder sb = new StringBuilder();
@@ -75,10 +63,7 @@ public class SrpConvertersUnitTests {
assertThat(SrpConverters.toListOfRedisClientInformation(new BulkReply(sb.toString().getBytes())).size(), equalTo(2));
}
/**
* @see DATAREDIS-268
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-268
public void expectExcptionWhenProvidingInvalidDataInReply() {
SrpConverters.toListOfRedisClientInformation(new Reply<String>() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,10 +39,7 @@ public class SrpReplyToTimeAsLongConverterUnitTests {
this.converter = SrpConverters.repliesToTimeAsLong();
}
/**
* @see DATAREDIS-206
*/
@Test
@Test // DATAREDIS-206
public void testConverterShouldCreateMillisecondsCorrectlyWhenGivenValidReplyArray() {
Reply<?> seconds = new BulkReply("1392183718".getBytes(Charset.forName("UTF-8")));
@@ -51,46 +48,31 @@ public class SrpReplyToTimeAsLongConverterUnitTests {
Assert.assertThat(converter.convert(new Reply[] { seconds, microseconds }), IsEqual.equalTo(1392183718555L));
}
/**
* @see DATAREDIS-206
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-206
public void testConverterShouldThrowExceptionWhenGivenReplyArrayIsNull() {
converter.convert(null);
}
/**
* @see DATAREDIS-206
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-206
public void testConverterShouldThrowExceptionWhenGivenReplyArrayIsEmpty() {
converter.convert(new Reply[] {});
}
/**
* @see DATAREDIS-206
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-206
public void testConverterShouldThrowExceptionWhenGivenReplyArrayHasOnlyOneItem() {
converter.convert(new Reply[] { new BulkReply(null) });
}
/**
* @see DATAREDIS-206
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-206
public void testConverterShouldThrowExceptionWhenGivenReplyArrayMoreThanTwoItems() {
converter.convert(new Reply[] { new BulkReply(null), new BulkReply(null), new BulkReply(null) });
}
/**
* @see DATAREDIS-206
*/
@Test(expected = NumberFormatException.class)
@Test(expected = NumberFormatException.class) // DATAREDIS-206
public void testConverterShouldThrowExecptionForNonParsableReply() {
Reply<?> invalidDataBlock = new BulkReply("123-not-a-number".getBytes(Charset.forName("UTF-8")));
@@ -99,10 +81,7 @@ public class SrpReplyToTimeAsLongConverterUnitTests {
converter.convert(new Reply[] { invalidDataBlock, microseconds });
}
/**
* @see DATAREDIS-206
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-206
public void testConverterShouldThrowExecptionForEmptyDataBlocks() {
Reply<?> invalidDataBlock = new BulkReply(null);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 - 2015 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,9 +44,7 @@ import org.springframework.oxm.xstream.XStreamMarshaller;
*/
abstract public class AbstractOperationsTestParams {
/**
* @see DATAREDIS-241
*/
// DATAREDIS-241
public static Collection<Object[]> testParams() {
ObjectFactory<String> stringFactory = new StringObjectFactory();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,10 +61,7 @@ public class ConnectionSplittingInterceptorUnitTests {
Mockito.when(connectionFactoryMock.getConnection()).thenReturn(freshConnectionMock);
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void interceptorShouldRequestFreshConnectionForReadonlyCommand() throws Throwable {
interceptor.intercept(boundConnectionMock, READONLY_METHOD, new Object[] { new byte[] {} }, null);
@@ -72,10 +69,7 @@ public class ConnectionSplittingInterceptorUnitTests {
Mockito.verifyZeroInteractions(boundConnectionMock);
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void interceptorShouldUseBoundConnectionForWriteOperations() throws Throwable {
interceptor.intercept(boundConnectionMock, WRITE_METHOD, new Object[] { new byte[] {}, 0L }, null);
@@ -83,11 +77,8 @@ public class ConnectionSplittingInterceptorUnitTests {
Mockito.verifyZeroInteractions(connectionFactoryMock);
}
/**
* @see DATAREDIS-73
*/
@SuppressWarnings("unchecked")
@Test(expected = InvalidDataAccessApiUsageException.class)
@Test(expected = InvalidDataAccessApiUsageException.class) // DATAREDIS-73
public void interceptorShouldNotWrapException() throws Throwable {
Mockito.when(freshConnectionMock.keys(Mockito.any(byte[].class))).thenThrow(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,10 +79,7 @@ public class DefaultClusterOperationsUnitTests {
this.clusterOps = new DefaultClusterOperations<String, String>(template);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void keysShouldDelegateToConnectionCorrectly() {
Set<byte[]> keys = new HashSet<byte[]>(Arrays.asList(serializer.serialize("key-1"), serializer.serialize("key-2")));
@@ -91,18 +88,12 @@ public class DefaultClusterOperationsUnitTests {
assertThat(clusterOps.keys(NODE_1, "*"), hasItems("key-1", "key-2"));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void keysShouldThrowExceptionWhenNodeIsNull() {
clusterOps.keys(null, "*");
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void keysShouldReturnEmptySetWhenNoKeysAvailable() {
when(connection.keys(any(RedisClusterNode.class), any(byte[].class))).thenReturn(null);
@@ -110,10 +101,7 @@ public class DefaultClusterOperationsUnitTests {
assertThat(clusterOps.keys(NODE_1, "*"), notNullValue());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void randomKeyShouldDelegateToConnection() {
when(connection.randomKey(any(RedisClusterNode.class))).thenReturn(serializer.serialize("key-1"));
@@ -121,18 +109,12 @@ public class DefaultClusterOperationsUnitTests {
assertThat(clusterOps.randomKey(NODE_1), is("key-1"));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void randomKeyShouldThrowExceptionWhenNodeIsNull() {
clusterOps.randomKey(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void randomKeyShouldReturnNullWhenNoKeyAvailable() {
when(connection.randomKey(any(RedisClusterNode.class))).thenReturn(null);
@@ -140,10 +122,7 @@ public class DefaultClusterOperationsUnitTests {
assertThat(clusterOps.randomKey(NODE_1), nullValue());
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void pingShouldDelegateToConnection() {
when(connection.ping(any(RedisClusterNode.class))).thenReturn("PONG");
@@ -151,18 +130,12 @@ public class DefaultClusterOperationsUnitTests {
assertThat(clusterOps.ping(NODE_1), is("PONG"));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void pingShouldThrowExceptionWhenNodeIsNull() {
clusterOps.ping(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void addSlotsShouldDelegateToConnection() {
clusterOps.addSlots(NODE_1, 1, 2, 3);
@@ -170,18 +143,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).clusterAddSlots(eq(NODE_1), Mockito.<int[]> anyVararg());
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void addSlotsShouldThrowExceptionWhenNodeIsNull() {
clusterOps.addSlots(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void addSlotsWithRangeShouldDelegateToConnection() {
clusterOps.addSlots(NODE_1, new SlotRange(1, 3));
@@ -189,18 +156,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).clusterAddSlots(eq(NODE_1), Mockito.<int[]> anyVararg());
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void addSlotsWithRangeShouldThrowExceptionWhenRangeIsNull() {
clusterOps.addSlots(NODE_1, (SlotRange) null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void bgSaveShouldDelegateToConnection() {
clusterOps.bgSave(NODE_1);
@@ -208,18 +169,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).bgSave(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void bgSaveShouldThrowExceptionWhenNodeIsNull() {
clusterOps.bgSave(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void meetShouldDelegateToConnection() {
clusterOps.meet(NODE_1);
@@ -227,18 +182,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).clusterMeet(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void meetShouldThrowExceptionWhenNodeIsNull() {
clusterOps.meet(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void forgetShouldDelegateToConnection() {
clusterOps.forget(NODE_1);
@@ -246,18 +195,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).clusterForget(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void forgetShouldThrowExceptionWhenNodeIsNull() {
clusterOps.forget(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void flushDbShouldDelegateToConnection() {
clusterOps.flushDb(NODE_1);
@@ -265,18 +208,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).flushDb(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void flushDbShouldThrowExceptionWhenNodeIsNull() {
clusterOps.flushDb(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void getSlavesShouldDelegateToConnection() {
clusterOps.getSlaves(NODE_1);
@@ -284,18 +221,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).clusterGetSlaves(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void getSlavesShouldThrowExceptionWhenNodeIsNull() {
clusterOps.getSlaves(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void saveShouldDelegateToConnection() {
clusterOps.save(NODE_1);
@@ -303,18 +234,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).save(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void saveShouldThrowExceptionWhenNodeIsNull() {
clusterOps.save(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void shutdownShouldDelegateToConnection() {
clusterOps.shutdown(NODE_1);
@@ -322,18 +247,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).shutdown(eq(NODE_1));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void shutdownShouldThrowExceptionWhenNodeIsNull() {
clusterOps.shutdown(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void executeShouldDelegateToConnection() {
final byte[] key = serializer.serialize("foo");
@@ -348,18 +267,12 @@ public class DefaultClusterOperationsUnitTests {
verify(connection, times(1)).get(eq(key));
}
/**
* @see DATAREDIS-315
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-315
public void executeShouldThrowExceptionWhenCallbackIsNull() {
clusterOps.execute(null);
}
/**
* @see DATAREDIS-315
*/
@Test
@Test // DATAREDIS-315
public void reshardShouldExecuteCommandsCorrectly() {
byte[] key = "foo".getBytes();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -113,10 +113,7 @@ public class DefaultGeoOperationsTests<K, M> {
});
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAdd() {
Long numAdded = geoOperations.geoAdd(keyFactory.instance(), POINT_PALERMO, valueFactory.instance());
@@ -124,10 +121,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(numAdded, is(1L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoAddWithLocationMap() {
Map<M, Point> memberCoordinateMap = new HashMap<M, Point>();
@@ -139,10 +133,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(numAdded, is(2L));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoDistShouldReturnDistanceInMetersByDefault() {
K key = keyFactory.instance();
@@ -157,10 +148,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(dist.getUnit(), is(equalTo("m")));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoDistShouldReturnDistanceInKilometersCorrectly() {
K key = keyFactory.instance();
@@ -175,10 +163,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(dist.getUnit(), is(equalTo("km")));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoDistShouldReturnDistanceInMilesCorrectly() {
K key = keyFactory.instance();
@@ -193,10 +178,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(dist.getUnit(), is(equalTo("mi")));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoDistShouldReturnDistanceInFeeCorrectly() {
K key = keyFactory.instance();
@@ -211,10 +193,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(dist.getUnit(), is(equalTo("ft")));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoHash() {
K key = keyFactory.instance();
@@ -233,10 +212,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.get(1), is(equalTo("sqdtr74hyu0")));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoPos() {
K key = keyFactory.instance();
@@ -259,10 +235,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.get(2), is(nullValue()));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusShouldReturnMembersCorrectly() {
K key = keyFactory.instance();
@@ -278,10 +251,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent(), hasSize(2));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusShouldReturnLocationsWithDistance() {
K key = keyFactory.instance();
@@ -305,10 +275,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member2));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusShouldReturnLocationsWithCoordinates() {
K key = keyFactory.instance();
@@ -332,10 +299,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member1));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusShouldReturnLocationsWithCoordinatesAndDistance() {
K key = keyFactory.instance();
@@ -363,10 +327,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member1));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusByMemberShouldReturnMembersCorrectly() {
K key = keyFactory.instance();
@@ -382,10 +343,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent(), hasSize(3));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusByMemberShouldReturnDistanceCorrectly() {
K key = keyFactory.instance();
@@ -407,10 +365,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member3));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusByMemberShouldReturnCoordinates() {
K key = keyFactory.instance();
@@ -435,10 +390,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member1));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void geoRadiusByMemberShouldReturnCoordinatesAndDistance() {
K key = keyFactory.instance();
@@ -466,10 +418,7 @@ public class DefaultGeoOperationsTests<K, M> {
assertThat(result.getContent().get(1).getContent().getName(), is(member3));
}
/**
* @see DATAREDIS-438
*/
@Test
@Test // DATAREDIS-438
public void testGeoRemove() {
K key = keyFactory.instance();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -149,10 +149,7 @@ public class DefaultHashOperationsTests<K, HK, HV> {
assertEquals(2L, numDeleted.longValue());
}
/**
* @see DATAREDIS-305
*/
@Test
@Test // DATAREDIS-305
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void testHScanReadsValuesFully() throws IOException {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,10 +86,7 @@ public class DefaultHyperLogLogOperationsTests<K, V> {
});
}
/**
* @see DATAREDIS
*/
@Test
@Test // DATAREDIS-308
@SuppressWarnings("unchecked")
public void addShouldAddDistinctValuesCorrectly() {
@@ -101,10 +98,7 @@ public class DefaultHyperLogLogOperationsTests<K, V> {
assertThat(hyperLogLogOps.add(key, v1, v2, v3), equalTo(1L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@SuppressWarnings("unchecked")
public void addShouldNotAddExistingValuesCorrectly() {
@@ -117,10 +111,7 @@ public class DefaultHyperLogLogOperationsTests<K, V> {
assertThat(hyperLogLogOps.add(key, v2), equalTo(0L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@SuppressWarnings("unchecked")
public void sizeShouldCountValuesCorrectly() {
@@ -133,10 +124,7 @@ public class DefaultHyperLogLogOperationsTests<K, V> {
assertThat(hyperLogLogOps.size(key), equalTo(3L));
}
/**
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@SuppressWarnings("unchecked")
public void sizeShouldCountValuesOfMultipleKeysCorrectly() {
@@ -153,11 +141,7 @@ public class DefaultHyperLogLogOperationsTests<K, V> {
assertThat(hyperLogLogOps.size(key, key2), equalTo(4L));
}
/**
* @throws InterruptedException
* @see DATAREDIS-308
*/
@Test
@Test // DATAREDIS-308
@SuppressWarnings("unchecked")
public void unionShouldMergeValuesOfMultipleKeysCorrectly() throws InterruptedException {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -186,10 +186,7 @@ public class DefaultListOperationsTests<K, V> {
assertThat(listOps.range(key, 0, -1), isEqual(Arrays.asList(new Object[] { v1, v2, v3 })));
}
/**
* @see DATAREDIS-288
*/
@Test
@Test // DATAREDIS-288
@SuppressWarnings("unchecked")
public void testRightPushAllCollection() {
@@ -203,35 +200,23 @@ public class DefaultListOperationsTests<K, V> {
assertThat(listOps.range(key, 0, -1), isEqual(Arrays.asList(new Object[] { v1, v2, v3 })));
}
/**
* @see DATAREDIS-288
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void rightPushAllShouldThrowExceptionWhenCalledWithEmptyCollection() {
listOps.rightPushAll(keyFactory.instance(), Collections.<V> emptyList());
}
/**
* @see DATAREDIS-288
*/
@SuppressWarnings("unchecked")
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void rightPushAllShouldThrowExceptionWhenCollectionContainsNullValue() {
listOps.rightPushAll(keyFactory.instance(), Arrays.asList(valueFactory.instance(), null));
}
/**
* @see DATAREDIS-288
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void rightPushAllShouldThrowExceptionWhenCalledWithNull() {
listOps.rightPushAll(keyFactory.instance(), (Collection<V>) null);
}
/**
* @see DATAREDIS-288
*/
@Test
@Test // DATAREDIS-288
@SuppressWarnings("unchecked")
public void testLeftPushAllCollection() {
@@ -245,27 +230,18 @@ public class DefaultListOperationsTests<K, V> {
assertThat(listOps.range(key, 0, -1), isEqual(Arrays.asList(new Object[] { v3, v2, v1 })));
}
/**
* @see DATAREDIS-288
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void leftPushAllShouldThrowExceptionWhenCalledWithEmptyCollection() {
listOps.leftPushAll(keyFactory.instance(), Collections.<V> emptyList());
}
/**
* @see DATAREDIS-288
*/
@SuppressWarnings("unchecked")
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void leftPushAllShouldThrowExceptionWhenCollectionContainsNullValue() {
listOps.leftPushAll(keyFactory.instance(), Arrays.asList(valueFactory.instance(), null));
}
/**
* @see DATAREDIS-288
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-288
public void leftPushAllShouldThrowExceptionWhenCalledWithNull() {
listOps.leftPushAll(keyFactory.instance(), (Collection<V>) null);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 - 2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -210,10 +210,7 @@ public class DefaultSetOperationsTests<K, V> {
assertThat(setOps.members(key), isEqual(Collections.singleton(v3)));
}
/**
* @see DATAREDIS-304
*/
@Test
@Test // DATAREDIS-304
@SuppressWarnings("unchecked")
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void testSSCanReadsValuesFully() throws IOException {
@@ -234,10 +231,7 @@ public class DefaultSetOperationsTests<K, V> {
assertThat(count, is(setOps.size(key)));
}
/**
* @see DATAREDIS-448
*/
@Test
@Test // DATAREDIS-448
public void intersectAndStoreShouldReturnNumberOfElementsInDestination() {
K sourceKey1 = keyFactory.instance();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,10 +31,7 @@ public class DefaultTypedTupleUnitTests {
private static final TypedTuple<String> WITH_SCORE_2 = new DefaultTypedTuple<String>("bar", 2D);
private static final TypedTuple<String> WITH_SCORE_NULL = new DefaultTypedTuple<String>("foo", null);
/**
* @see DATAREDIS-294
*/
@Test
@Test // DATAREDIS-294
public void compareToShouldUseScore() {
assertThat(WITH_SCORE_1.compareTo(WITH_SCORE_2), equalTo(-1));
@@ -42,20 +39,14 @@ public class DefaultTypedTupleUnitTests {
assertThat(WITH_SCORE_1.compareTo(ANOTHER_ONE_WITH_SCORE_1), equalTo(0));
}
/**
* @see DATAREDIS-294
*/
@Test
@Test // DATAREDIS-294
public void compareToShouldConsiderGivenNullAsZeroScore() {
assertThat(WITH_SCORE_1.compareTo(null), equalTo(1));
assertThat(WITH_SCORE_NULL.compareTo(null), equalTo(0));
}
/**
* @see DATAREDIS-294
*/
@Test
@Test // DATAREDIS-294
public void compareToShouldConsiderNullScoreAsZeroScore() {
assertThat(WITH_SCORE_1.compareTo(WITH_SCORE_NULL), equalTo(1));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -108,10 +108,7 @@ public class DefaultValueOperationsTests<K, V> {
assertEquals(Long.valueOf((Long) v1 - 20), (Long) valueOps.get(key));
}
/**
* @see DATAREDIS-247
*/
@Test
@Test // DATAREDIS-247
public void testIncrementDouble() {
assumeTrue(RedisTestProfileValueSource.matches("redisVersion", "2.6"));
@@ -197,10 +194,7 @@ public class DefaultValueOperationsTests<K, V> {
}, 1000);
}
/**
* @see DATAREDIS-271
*/
@Test
@Test // DATAREDIS-271
public void testSetWithExpirationWithTimeUnitMilliseconds() {
assumeTrue(RedisTestProfileValueSource.matches("runLongTests", "true"));
@@ -287,10 +281,7 @@ public class DefaultValueOperationsTests<K, V> {
assertNotNull(((DefaultValueOperations) valueOps).deserializeKey((byte[]) key1));
}
/**
* @see DATAREDIS-197
*/
@Test
@Test // DATAREDIS-197
public void testSetAndGetBit() {
assumeTrue(redisTemplate instanceof StringRedisTemplate);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -183,10 +183,7 @@ public class DefaultZSetOperationsTests<K, V> {
assertThat(tuple, isEqual(new DefaultTypedTuple<V>(value2, 3.7)));
}
/**
* @see DATAREDIS-407
*/
@Test
@Test // DATAREDIS-407
public void testRangeByLexUnbounded() {
assumeThat(valueFactory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class),
@@ -207,10 +204,7 @@ public class DefaultZSetOperationsTests<K, V> {
assertThat(tuple, isEqual(value1));
}
/**
* @see DATAREDIS-407
*/
@Test
@Test // DATAREDIS-407
public void testRangeByLexBounded() {
assumeThat(valueFactory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class),
@@ -231,10 +225,7 @@ public class DefaultZSetOperationsTests<K, V> {
assertThat(tuple, isEqual(value2));
}
/**
* @see DATAREDIS-407
*/
@Test
@Test // DATAREDIS-407
public void testRangeByLexUnboundedWithLimit() {
assumeThat(valueFactory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class),
@@ -256,10 +247,7 @@ public class DefaultZSetOperationsTests<K, V> {
assertThat(tuple, isEqual(value2));
}
/**
* @see DATAREDIS-407
*/
@Test
@Test // DATAREDIS-407
public void testRangeByLexBoundedWithLimit() {
assumeThat(valueFactory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class),
@@ -350,10 +338,7 @@ public class DefaultZSetOperationsTests<K, V> {
assertThat(zSetOps.size(key), equalTo(3L));
}
/**
* @see DATAREDIS-306
*/
@Test
@Test // DATAREDIS-306
@IfProfileValue(name = "redisVersion", value = "2.8+")
public void testZScanShouldReadEntireValueRange() throws IOException {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,10 +70,7 @@ public class IndexWriterUnitTests {
writer = new IndexWriter(connectionMock, converter);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void addKeyToIndexShouldInvokeSaddCorrectly() {
writer.addKeyToIndex(KEY_BIN, new SimpleIndexedPropertyValue(KEYSPACE, "firstname", "Rand"));
@@ -83,18 +80,12 @@ public class IndexWriterUnitTests {
eq("persons:firstname:Rand".getBytes(CHARSET)));
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void addKeyToIndexShouldThrowErrorWhenIndexedDataIsNull() {
writer.addKeyToIndex(KEY_BIN, null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void removeKeyFromExistingIndexesShouldCheckForExistingIndexesForPath() {
writer.removeKeyFromExistingIndexes(KEY_BIN, new StubIndxedData());
@@ -103,10 +94,7 @@ public class IndexWriterUnitTests {
verifyNoMoreInteractions(connectionMock);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void removeKeyFromExistingIndexesShouldRemoveKeyFromAllExistingIndexesForPath() {
byte[] indexKey1 = "persons:firstname:rand".getBytes(CHARSET);
@@ -121,18 +109,12 @@ public class IndexWriterUnitTests {
verify(connectionMock).sRem(indexKey2, KEY_BIN);
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void removeKeyFromExistingIndexesShouldThrowExecptionForNullIndexedData() {
writer.removeKeyFromExistingIndexes(KEY_BIN, null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void removeAllIndexesShouldDeleteAllIndexKeys() {
byte[] indexKey1 = "persons:firstname:rand".getBytes(CHARSET);
@@ -149,19 +131,13 @@ public class IndexWriterUnitTests {
assertThat(captor.getAllValues(), hasItems(indexKey1, indexKey2));
}
/**
* @see DATAREDIS-425
*/
@Test(expected = InvalidDataAccessApiUsageException.class)
@Test(expected = InvalidDataAccessApiUsageException.class) // DATAREDIS-425
public void addToIndexShouldThrowDataAccessExceptionWhenAddingDataThatConnotBeConverted() {
writer.addKeyToIndex(KEY_BIN, new SimpleIndexedPropertyValue(KEYSPACE, "firstname", new DummyObject()));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void addToIndexShouldUseRegisteredConverterWhenAddingData() {
DummyObject value = new DummyObject();
@@ -180,10 +156,7 @@ public class IndexWriterUnitTests {
verify(connectionMock).sAdd(eq(("persons:firstname:" + identityHexString).getBytes(CHARSET)), eq(KEY_BIN));
}
/**
* @see DATAREDIS-512
*/
@Test
@Test // DATAREDIS-512
public void createIndexShouldNotTryToRemoveExistingValues() {
when(connectionMock.keys(any(byte[].class)))
@@ -198,10 +171,7 @@ public class IndexWriterUnitTests {
verify(connectionMock, never()).sRem(any(byte[].class), eq(KEY_BIN));
}
/**
* @see DATAREDIS-512
*/
@Test
@Test // DATAREDIS-512
public void updateIndexShouldRemoveExistingValues() {
when(connectionMock.keys(any(byte[].class)))
@@ -216,10 +186,7 @@ public class IndexWriterUnitTests {
verify(connectionMock, times(1)).sRem(any(byte[].class), eq(KEY_BIN));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void removeGeoIndexShouldCallGeoRemove() {
byte[] indexKey1 = "persons:location".getBytes(CHARSET);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,10 +74,7 @@ public class MultithreadedRedisTemplateTests {
return Arrays.asList(new Object[][] { { jedis }, { lettuce }, { srp } });
}
/**
* @see DATAREDIS-300
*/
@Test
@Test // DATAREDIS-300
public void assertResouresAreReleasedProperlyWhenSharingRedisTemplate() throws InterruptedException {
final RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,66 +30,42 @@ public class RedisCommandUnitTests {
public @Rule ExpectedException expectedException = ExpectedException.none();
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldIdentifyAliasCorrectly() {
assertThat(RedisCommand.CONFIG_SET.isRepresentedBy("setconfig"), equalTo(true));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldIdentifyAliasCorrectlyWhenNamePassedInMixedCase() {
assertThat(RedisCommand.CONFIG_SET.isRepresentedBy("SetConfig"), equalTo(true));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldNotThrowExceptionWhenUsingNullKeyForRepresentationCheck() {
assertThat(RedisCommand.CONFIG_SET.isRepresentedBy(null), equalTo(false));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldIdentifyAliasCorrectlyViaLookup() {
assertThat(RedisCommand.failsafeCommandLookup("setconfig"), is(RedisCommand.CONFIG_SET));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldIdentifyAliasCorrectlyWhenNamePassedInMixedCaseViaLookup() {
assertThat(RedisCommand.failsafeCommandLookup("SetConfig"), is(RedisCommand.CONFIG_SET));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldReturnUnknownCommandForUnknownCommandString() {
assertThat(RedisCommand.failsafeCommandLookup("strangecommand"), is(RedisCommand.UNKNOWN));
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldNotThrowExceptionOnValidArgumentCount() {
RedisCommand.AUTH.validateArgumentCount(1);
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldThrowExceptionOnInvalidArgumentCountWhenExpectedExcatMatch() {
expectedException.expect(IllegalArgumentException.class);
@@ -97,10 +73,7 @@ public class RedisCommandUnitTests {
RedisCommand.AUTH.validateArgumentCount(2);
}
/**
* @see DATAREDIS-73
*/
@Test
@Test // DATAREDIS-73
public void shouldThrowExceptionOnInvalidArgumentCountWhenExpectedMinimalMatch() {
expectedException.expect(IllegalArgumentException.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -114,10 +114,7 @@ public class RedisKeyValueAdapterTests {
}
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void putWritesDataCorrectly() {
Person rand = new Person();
@@ -131,10 +128,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().entries("persons:1").size(), is(2));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void putWritesSimpleIndexDataCorrectly() {
Person rand = new Person();
@@ -146,10 +140,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().members("persons:firstname:rand"), hasItems("1"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void putWritesNestedDataCorrectly() {
Person rand = new Person();
@@ -162,10 +153,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().entries("persons:1").size(), is(2));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void putWritesSimpleNestedIndexValuesCorrectly() {
Person rand = new Person();
@@ -178,10 +166,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().members("persons:address.country:Andor"), hasItems("1"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getShouldReadSimpleObjectCorrectly() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -195,10 +180,7 @@ public class RedisKeyValueAdapterTests {
assertThat(((Person) loaded).age, is(24));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getShouldReadNestedObjectCorrectly() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -212,10 +194,7 @@ public class RedisKeyValueAdapterTests {
assertThat(((Person) loaded).address.country, is("Andor"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void couldReadsKeyspaceSizeCorrectly() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -228,10 +207,7 @@ public class RedisKeyValueAdapterTests {
assertThat(adapter.count("persons"), is(3L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void deleteRemovesEntriesCorrectly() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -246,10 +222,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.hasKey("persons:1"), is(false));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void deleteCleansIndexedDataCorrectly() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -266,10 +239,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().members("persons:firstname:rand"), not(hasItem("1")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void keyExpiredEventShouldRemoveHelperStructures() {
Map<String, String> map = new LinkedHashMap<String, String>();
@@ -288,10 +258,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().members("persons"), not(hasItem("1")));
}
/**
* @see DATAREDIS-512
*/
@Test
@Test // DATAREDIS-512
public void putWritesIndexDataCorrectly() {
Person rand = new Person();
@@ -327,10 +294,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().isMember("persons:mat:idx", "persons:firstname:mat"), is(true));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldAlterIndexDataCorrectly() {
Person rand = new Person();
@@ -349,10 +313,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.hasKey("persons:firstname:mat"), is(true));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldAlterIndexDataOnNestedObjectCorrectly() {
Person rand = new Person();
@@ -375,10 +336,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.hasKey("persons:address.country:tear"), is(true));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldAlterIndexDataOnNestedObjectPathCorrectly() {
Person rand = new Person();
@@ -398,10 +356,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.hasKey("persons:address.country:tear"), is(true));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldRemoveComplexObjectCorrectly() {
Person rand = new Person();
@@ -421,10 +376,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForSet().isMember("persons:address.country:andor", "1"), is(false));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldRemoveSimpleListValuesCorrectly() {
Person rand = new Person();
@@ -441,10 +393,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().hasKey("persons:1", "nicknames.[1]"), is(false));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldRemoveComplexListValuesCorrectly() {
Person mat = new Person();
@@ -471,10 +420,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().hasKey("persons:1", "coworkers.[1].nicknames.[0]"), is(false));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldRemoveSimpleMapValuesCorrectly() {
Person rand = new Person();
@@ -490,10 +436,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().hasKey("persons:1", "physicalAttributes.[eye-color]"), is(false));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void updateShouldRemoveComplexMapValuesCorrectly() {
Person tam = new Person();
@@ -512,10 +455,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForHash().hasKey("persons:1", "relatives.[stepfather].firstname"), is(false));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void putShouldCreateGeoIndexCorrectly() {
Person tam = new Person();
@@ -529,10 +469,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForZSet().score("persons:address:location", "1"), is(notNullValue()));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void deleteShouldRemoveGeoIndexCorrectly() {
Person tam = new Person();
@@ -548,10 +485,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForZSet().score("persons:address:location", "1"), is(nullValue()));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void updateShouldAlterGeoIndexCorrectlyOnDelete() {
Person tam = new Person();
@@ -570,10 +504,7 @@ public class RedisKeyValueAdapterTests {
assertThat(template.opsForZSet().score("persons:address:location", "1"), is(nullValue()));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void updateShouldAlterGeoIndexCorrectlyOnUpdate() {
Person tam = new Person();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -84,10 +84,7 @@ public class RedisKeyValueAdapterUnitTests {
adapter.destroy();
}
/**
* @see DATAREDIS-507
*/
@Test
@Test // DATAREDIS-507
public void destroyShouldNotDestroyConnectionFactory() throws Exception {
adapter.destroy();
@@ -95,11 +92,7 @@ public class RedisKeyValueAdapterUnitTests {
verify(jedisConnectionFactoryMock, never()).destroy();
}
/**
* @see DATAREDIS-512
* @see DATAREDIS-530
*/
@Test
@Test // DATAREDIS-512, DATAREDIS-530
public void putShouldRemoveExistingIndexValuesWhenUpdating() {
RedisData rd = new RedisData(Bucket.newBucketFromStringMap(Collections.singletonMap("_id", "1")));
@@ -115,10 +108,7 @@ public class RedisKeyValueAdapterUnitTests {
org.mockito.Matchers.any(byte[].class));
}
/**
* @see DATAREDIS-512
*/
@Test
@Test // DATAREDIS-512
public void putShouldNotTryToRemoveExistingIndexValuesWhenInsertingNew() {
RedisData rd = new RedisData(Bucket.newBucketFromStringMap(Collections.singletonMap("_id", "1")));
@@ -133,10 +123,7 @@ public class RedisKeyValueAdapterUnitTests {
verify(redisConnectionMock, never()).sRem(org.mockito.Matchers.any(byte[].class), (byte[][]) anyVararg());
}
/**
* @see DATAREDIS-491
*/
@Test
@Test // DATAREDIS-491
public void shouldInitKeyExpirationListenerOnStartup() throws Exception {
adapter.destroy();
@@ -150,10 +137,7 @@ public class RedisKeyValueAdapterUnitTests {
assertThat(listener, notNullValue());
}
/**
* @see DATAREDIS-491
*/
@Test
@Test // DATAREDIS-491
public void shouldInitKeyExpirationListenerOnFirstPutWithTtl() throws Exception {
adapter.destroy();
@@ -177,10 +161,7 @@ public class RedisKeyValueAdapterUnitTests {
assertThat(listener, notNullValue());
}
/**
* @see DATAREDIS-491
*/
@Test
@Test // DATAREDIS-491
public void shouldNeverInitKeyExpirationListener() throws Exception {
adapter.destroy();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -115,10 +115,7 @@ public class RedisKeyValueTemplateTests {
adapter.destroy();
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void savesObjectCorrectly() {
final Person rand = new Person();
@@ -137,10 +134,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findProcessesCallbackReturningSingleIdCorrectly() {
Person rand = new Person();
@@ -164,10 +158,7 @@ public class RedisKeyValueTemplateTests {
assertThat(result, hasItems(mat));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findProcessesCallbackReturningMultipleIdsCorrectly() {
final Person rand = new Person();
@@ -191,10 +182,7 @@ public class RedisKeyValueTemplateTests {
assertThat(result, hasItems(rand, mat));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findProcessesCallbackReturningNullCorrectly() {
Person rand = new Person();
@@ -217,10 +205,7 @@ public class RedisKeyValueTemplateTests {
assertThat(result.size(), is(0));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdate() {
final Person rand = new Person();
@@ -313,10 +298,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateSimpleType() {
final VariousTypes source = new VariousTypes();
@@ -343,10 +325,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateComplexType() {
Item callandor = new Item();
@@ -390,10 +369,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateObjectType() {
Item callandor = new Item();
@@ -440,10 +416,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateSimpleTypedMap() {
final VariousTypes source = new VariousTypes();
@@ -477,10 +450,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateComplexTypedMap() {
final VariousTypes source = new VariousTypes();
@@ -543,10 +513,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateObjectTypedMap() {
final VariousTypes source = new VariousTypes();
@@ -626,10 +593,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateSimpleTypedList() {
final VariousTypes source = new VariousTypes();
@@ -664,10 +628,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateComplexTypedList() {
final VariousTypes source = new VariousTypes();
@@ -723,10 +684,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void partialUpdateObjectTypedList() {
final VariousTypes source = new VariousTypes();
@@ -795,10 +753,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-530
*/
@Test
@Test // DATAREDIS-530
public void partialUpdateShouldLeaveIndexesNotInvolvedInUpdateUntouched() {
final Person rand = new Person();
@@ -830,10 +785,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-530
*/
@Test
@Test // DATAREDIS-530
public void updateShouldAlterIndexesCorrectlyWhenValuesGetRemovedFromHash() {
final Person rand = new Person();
@@ -870,10 +822,7 @@ public class RedisKeyValueTemplateTests {
});
}
/**
* @see DATAREDIS-523
*/
@Test
@Test // DATAREDIS-523
public void shouldReadBackExplicitTimeToLive() throws InterruptedException {
WithTtl source = new WithTtl();
@@ -890,10 +839,7 @@ public class RedisKeyValueTemplateTests {
assertThat(target.ttl.doubleValue(), is(closeTo(3D, 1D)));
}
/**
* @see DATAREDIS-523
*/
@Test
@Test // DATAREDIS-523
public void shouldReadBackExplicitTimeToLiveToPrimitiveField() throws InterruptedException {
WithPrimitiveTtl source = new WithPrimitiveTtl();
@@ -909,10 +855,7 @@ public class RedisKeyValueTemplateTests {
assertThat((double) target.ttl, is(closeTo(3D, 1D)));
}
/**
* @see DATAREDIS-523
*/
@Test
@Test // DATAREDIS-523
public void shouldReadBackExplicitTimeToLiveWhenFetchingList() throws InterruptedException {
WithTtl source = new WithTtl();
@@ -930,10 +873,7 @@ public class RedisKeyValueTemplateTests {
assertThat(target.ttl.doubleValue(), is(closeTo(3D, 1D)));
}
/**
* @see DATAREDIS-523
*/
@Test
@Test // DATAREDIS-523
public void shouldReadBackExplicitTimeToLiveAndSetItToMinusOnelIfPersisted() throws InterruptedException {
WithTtl source = new WithTtl();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -324,10 +324,7 @@ public class RedisTemplateTests<K, V> {
assertEquals(Arrays.asList(new Object[] { 5l, 1l, 2l, Arrays.asList(new Long[] { 10l, 11l }) }), results);
}
/**
* @see DATAREDIS-500
*/
@Test
@Test // DATAREDIS-500
public void testExecutePipelinedWidthDifferentHashKeySerializerAndHashValueSerializer() {
assumeTrue(redisTemplate instanceof StringRedisTemplate);
@@ -534,20 +531,14 @@ public class RedisTemplateTests<K, V> {
assertEquals(Long.valueOf(1), redisTemplate.getExpire(key1, TimeUnit.SECONDS));
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testGetExpireSecondsForKeyDoesNotExist() {
Long expire = redisTemplate.getExpire(keyFactory.instance(), TimeUnit.SECONDS);
assertTrue(expire < 0L);
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testGetExpireSecondsForKeyExistButHasNoAssociatedExpire() {
K key = keyFactory.instance();
@@ -556,10 +547,7 @@ public class RedisTemplateTests<K, V> {
assertTrue(expire < 0L);
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testGetExpireMillisForKeyDoesNotExist() {
Long expire = redisTemplate.getExpire(keyFactory.instance(), TimeUnit.MILLISECONDS);
@@ -567,10 +555,7 @@ public class RedisTemplateTests<K, V> {
assertTrue(expire < 0L);
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testGetExpireMillisForKeyExistButHasNoAssociatedExpire() {
K key = keyFactory.instance();
@@ -581,10 +566,7 @@ public class RedisTemplateTests<K, V> {
assertTrue(expire < 0L);
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
public void testGetExpireMillis() {
assumeTrue(redisTemplate.getConnectionFactory() instanceof JedisConnectionFactory
@@ -600,10 +582,7 @@ public class RedisTemplateTests<K, V> {
assertThat(ttl, lessThan(25L));
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
@SuppressWarnings({ "unchecked", "rawtypes" })
public void testGetExpireMillisUsingTransactions() {
@@ -630,10 +609,7 @@ public class RedisTemplateTests<K, V> {
assertThat(((Long) result.get(1)), lessThan(25L));
}
/**
* @see DATAREDIS-526
*/
@Test
@Test // DATAREDIS-526
@SuppressWarnings({ "unchecked", "rawtypes" })
public void testGetExpireMillisUsingPipelining() {
@@ -761,10 +737,7 @@ public class RedisTemplateTests<K, V> {
assertEquals(DataType.STRING, redisTemplate.type(key1));
}
/**
* @see DATAREDIS-506
*/
@Test
@Test // DATAREDIS-506
public void testWatch() {
final K key1 = keyFactory.instance();
V value1 = valueFactory.instance();
@@ -840,10 +813,7 @@ public class RedisTemplateTests<K, V> {
assertThat(redisTemplate.opsForValue().get(key1), isEqual(value3));
}
/**
* @see DATAREDIS-506
*/
@Test
@Test // DATAREDIS-506
public void testWatchMultipleKeys() {
final K key1 = keyFactory.instance();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,30 +55,21 @@ public class RedisTemplateUnitTests {
template.afterPropertiesSet();
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfIsDelegatedToConnectionCorrectly() {
template.slaveOf("127.0.0.1", 1001);
verify(redisConnectionMock, times(1)).slaveOf(eq("127.0.0.1"), eq(1001));
}
/**
* @see DATAREDIS-277
*/
@Test
@Test // DATAREDIS-277
public void slaveOfNoOneIsDelegatedToConnectionCorrectly() {
template.slaveOfNoOne();
verify(redisConnectionMock, times(1)).slaveOfNoOne();
}
/**
* @see DATAREDIS-501
*/
@Test
@Test // DATAREDIS-501
public void templateShouldPassOnAndUseResoureLoaderClassLoaderToDefaultJdkSerializerWhenNotAlreadySet() {
ShadowingClassLoader scl = new ShadowingClassLoader(ClassLoader.getSystemClassLoader());
@@ -96,10 +87,7 @@ public class RedisTemplateUnitTests {
assertThat(deserialized.getClass().getClassLoader(), is((ClassLoader) scl));
}
/**
* @see DATAREDIS-531
*/
@Test
@Test // DATAREDIS-531
public void executeWithStickyConnectionShouldNotCloseConnectionWhenDone() {
CapturingCallback callback = new CapturingCallback();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,28 +41,19 @@ public class ScanCursorUnitTests {
public @Rule ExpectedException exception = ExpectedException.none();
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
public void cursorShouldNotLoopWhenNoValuesFound() {
CapturingCursorDummy cursor = initCursor(new LinkedList<ScanIteration<String>>());
assertThat(cursor.hasNext(), is(false));
}
/**
* @see DATAREDIS-290
*/
@Test(expected = NoSuchElementException.class)
@Test(expected = NoSuchElementException.class) // DATAREDIS-290
public void cursorShouldReturnNullWhenNoNextElementAvailable() {
initCursor(new LinkedList<ScanIteration<String>>()).next();
}
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
public void cursorShouldNotLoopWhenReachingStartingPointInFistLoop() {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -82,10 +73,7 @@ public class ScanCursorUnitTests {
assertThat(cursor.hasNext(), is(false));
}
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
public void cursorShouldStopLoopWhenReachingStartingPoint() {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -107,10 +95,7 @@ public class ScanCursorUnitTests {
assertThat(cursor.hasNext(), is(false));
}
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
public void shouldThrowExceptionWhenAccessingClosedCursor() {
CapturingCursorDummy cursor = new CapturingCursorDummy(null);
@@ -123,10 +108,7 @@ public class ScanCursorUnitTests {
cursor.next();
}
/**
* @see DATAREDIS-290
*/
@Test(expected = InvalidDataAccessApiUsageException.class)
@Test(expected = InvalidDataAccessApiUsageException.class) // DATAREDIS-290
public void repoeningCursorShouldHappenAtLastPosition() throws IOException {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -146,10 +128,7 @@ public class ScanCursorUnitTests {
cursor.open();
}
/**
* @see DATAREDIS-290
*/
@Test
@Test // DATAREDIS-290
public void positionShouldBeIncrementedCorrectly() throws IOException {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -167,10 +146,7 @@ public class ScanCursorUnitTests {
assertThat(cursor.getPosition(), is(2L));
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
public void hasNextShouldCallScanUntilFinishedWhenScanResultIsAnEmptyCollection() {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -191,10 +167,7 @@ public class ScanCursorUnitTests {
assertThat(result, hasItems("spring", "redis"));
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
public void hasNextShouldStopWhenScanResultIsAnEmptyCollectionAndStateIsFinished() {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();
@@ -217,10 +190,7 @@ public class ScanCursorUnitTests {
assertThat(result, hasItems("spring", "data"));
}
/**
* @see DATAREDIS-417
*/
@Test
@Test // DATAREDIS-417
public void hasNextShouldStopCorrectlyWhenWholeScanIterationDoesNotReturnResultsAndStateIsFinished() {
LinkedList<ScanIteration<String>> values = new LinkedList<ScanIteration<String>>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,26 +39,17 @@ public class CompositeIndexResolverUnitTests {
@Mock IndexResolver resolver2;
@Mock TypeInformation<?> typeInfoMock;
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void shouldRejectNull() {
new CompositeIndexResolver(null);
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void shouldRejectCollectionWithNullValues() {
new CompositeIndexResolver(Arrays.asList(resolver1, null, resolver2));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldCollectionIndexesFromResolvers() {
when(resolver1.resolveIndexesFor(any(TypeInformation.class), anyObject())).thenReturn(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,18 +80,12 @@ public class PathIndexResolverUnitTests {
new RedisMappingContext(new MappingConfiguration(indexConfig, new KeyspaceConfiguration())));
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void shouldThrowExceptionOnNullMappingContext() {
new PathIndexResolver(null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveAnnotatedIndexOnRootWhenValueIsNotNull() {
Address address = new Address();
@@ -103,10 +97,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(Address.class.getName(), "country", "andor")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldNotResolveAnnotatedIndexOnRootWhenValueIsNull() {
Address address = new Address();
@@ -117,10 +108,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes.size(), is(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveAnnotatedIndexOnNestedObjectWhenValueIsNotNull() {
Person person = new Person();
@@ -133,10 +121,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "address.country", "andor")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveMultipleAnnotatedIndexesInLists() {
TheWheelOfTime twot = new TheWheelOfTime();
@@ -162,10 +147,7 @@ public class PathIndexResolverUnitTests {
new SimpleIndexedPropertyValue(KEYSPACE_TWOT, "mainCharacters.address.country", "saldaea")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveAnnotatedIndexesInMap() {
TheWheelOfTime twot = new TheWheelOfTime();
@@ -186,10 +168,7 @@ public class PathIndexResolverUnitTests {
hasItem(new SimpleIndexedPropertyValue(KEYSPACE_TWOT, "places.stone-of-tear.address.country", "illian")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveConfiguredIndexesInMapOfSimpleTypes() {
indexConfig.addIndexDefinition(new SimpleIndexDefinition(KEYSPACE_PERSON, "physicalAttributes.eye-color"));
@@ -205,10 +184,7 @@ public class PathIndexResolverUnitTests {
hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "physicalAttributes.eye-color", "grey")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldResolveConfiguredIndexesInMapOfComplexTypes() {
indexConfig.addIndexDefinition(new SimpleIndexDefinition(KEYSPACE_PERSON, "relatives.father.firstname"));
@@ -228,11 +204,7 @@ public class PathIndexResolverUnitTests {
hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "relatives.father.firstname", "janduin")));
}
/**
* @see DATAREDIS-425
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-425, DATAREDIS-471
public void shouldIgnoreConfiguredIndexesInMapWhenValueIsNull() {
indexConfig.addIndexDefinition(new SimpleIndexDefinition(KEYSPACE_PERSON, "physicalAttributes.eye-color"));
@@ -247,10 +219,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes.iterator().next(), IsInstanceOf.instanceOf(RemoveIndexedData.class));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldNotResolveIndexOnReferencedEntity() {
PersonWithAddressReference rand = new PersonWithAddressReference();
@@ -264,20 +233,14 @@ public class PathIndexResolverUnitTests {
assertThat(indexes.size(), is(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldReturnNullWhenNoIndexConfigured() {
when(propertyMock.isAnnotationPresent(eq(Indexed.class))).thenReturn(false);
assertThat(resolve("foo", "rand"), nullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldReturnDataWhenIndexConfigured() {
when(propertyMock.isAnnotationPresent(eq(Indexed.class))).thenReturn(false);
@@ -286,10 +249,7 @@ public class PathIndexResolverUnitTests {
assertThat(resolve("foo", "rand"), notNullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldReturnDataWhenNoIndexConfiguredButPropertyAnnotated() {
when(propertyMock.isAnnotationPresent(eq(Indexed.class))).thenReturn(true);
@@ -298,10 +258,7 @@ public class PathIndexResolverUnitTests {
assertThat(resolve("foo", "rand"), notNullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldRemovePositionIndicatorForValuesInLists() {
when(propertyMock.isCollectionLike()).thenReturn(true);
@@ -313,10 +270,7 @@ public class PathIndexResolverUnitTests {
assertThat(index.getIndexName(), is("list.name"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldRemoveKeyIndicatorForValuesInMap() {
when(propertyMock.isMap()).thenReturn(true);
@@ -328,10 +282,7 @@ public class PathIndexResolverUnitTests {
assertThat(index.getIndexName(), is("map.foo.name"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldKeepNumericalKeyForValuesInMap() {
when(propertyMock.isMap()).thenReturn(true);
@@ -343,10 +294,7 @@ public class PathIndexResolverUnitTests {
assertThat(index.getIndexName(), is("map.0.name"));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldInspectObjectTypeProperties() {
Item hat = new Item();
@@ -361,10 +309,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "feature.type", "hat")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldInspectObjectTypePropertiesButIgnoreNullValues() {
Item hat = new Item();
@@ -378,10 +323,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes.size(), is(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldInspectObjectTypeValuesInMapProperties() {
Item hat = new Item();
@@ -399,10 +341,7 @@ public class PathIndexResolverUnitTests {
hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "characteristics.clothing.type", "hat")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexShouldInspectObjectTypeValuesInListProperties() {
Item hat = new Item();
@@ -419,10 +358,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "items.type", "hat")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexAllowCustomIndexName() {
indexConfig.addIndexDefinition(new SimpleIndexDefinition(KEYSPACE_PERSON, "items.type", "itemsType"));
@@ -441,10 +377,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "itemsType", "hat")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexForTypeThatHasNoIndexDefined() {
Size size = new Size();
@@ -456,10 +389,7 @@ public class PathIndexResolverUnitTests {
assertThat(indexes, is(empty()));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexOnMapField() {
IndexedOnMapField source = new IndexedOnMapField();
@@ -478,10 +408,7 @@ public class PathIndexResolverUnitTests {
new SimpleIndexedPropertyValue(IndexedOnMapField.class.getName(), "values.arya", "stark")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveIndexOnListField() {
IndexedOnListField source = new IndexedOnListField();
@@ -500,10 +427,7 @@ public class PathIndexResolverUnitTests {
new SimpleIndexedPropertyValue(IndexedOnListField.class.getName(), "values", "arya")));
}
/**
* @see DATAREDIS-509
*/
@Test
@Test // DATAREDIS-509
public void resolveIndexOnPrimitiveArrayField() {
IndexedOnPrimitiveArrayField source = new IndexedOnPrimitiveArrayField();
@@ -520,10 +444,7 @@ public class PathIndexResolverUnitTests {
new SimpleIndexedPropertyValue(IndexedOnPrimitiveArrayField.class.getName(), "values", 3)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void resolveGeoIndexShouldMapNameCorrectly() {
when(propertyMock.isMap()).thenReturn(true);
@@ -535,10 +456,7 @@ public class PathIndexResolverUnitTests {
assertThat(index.getIndexName(), is("location"));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void resolveGeoIndexShouldMapNameForNestedPropertyCorrectly() {
when(propertyMock.isMap()).thenReturn(true);
@@ -550,10 +468,7 @@ public class PathIndexResolverUnitTests {
assertThat(index.getIndexName(), is("property:location"));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void resolveGeoIndexOnPointField() {
GeoIndexedOnPoint source = new GeoIndexedOnPoint();
@@ -567,10 +482,7 @@ public class PathIndexResolverUnitTests {
new GeoIndexedPropertyValue(GeoIndexedOnPoint.class.getName(), "location", source.location)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void resolveGeoIndexOnArrayFieldThrowsError() {
exception.expect(IllegalArgumentException.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,28 +73,19 @@ public class SpelIndexResolverUnitTests {
resolver = createWithExpression("getAttribute('" + securityContextAttrName + "')?.authentication?.name");
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void constructorNullRedisMappingContext() {
mappingContext = null;
new SpelIndexResolver(mappingContext);
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void constructorNullSpelExpressionParser() {
new SpelIndexResolver(mappingContext, null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void nullValue() {
Set<IndexedData> indexes = resolver.resolveIndexesFor(typeInformation, null);
@@ -102,10 +93,7 @@ public class SpelIndexResolverUnitTests {
assertThat(indexes.size(), equalTo(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void wrongKeyspace() {
typeInformation = ClassTypeInformation.from(String.class);
@@ -114,10 +102,7 @@ public class SpelIndexResolverUnitTests {
assertThat(indexes.size(), equalTo(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void sessionAttributeNull() {
session = new Session();
@@ -126,10 +111,7 @@ public class SpelIndexResolverUnitTests {
assertThat(indexes.size(), equalTo(0));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolvePrincipalName() {
Set<IndexedData> indexes = resolver.resolveIndexesFor(typeInformation, session);
@@ -137,10 +119,7 @@ public class SpelIndexResolverUnitTests {
assertThat(indexes, hasItem(new SimpleIndexedPropertyValue(keyspace, indexName, username)));
}
/**
* @see DATAREDIS-425
*/
@Test(expected = SpelEvaluationException.class)
@Test(expected = SpelEvaluationException.class) // DATAREDIS-425
public void spelError() {
session.setAttribute(securityContextAttrName, "");
@@ -148,10 +127,7 @@ public class SpelIndexResolverUnitTests {
resolver.resolveIndexesFor(typeInformation, session);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void withBeanAndThis() {
this.resolver = createWithExpression("@bean.run(#this)");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,10 +26,7 @@ import org.junit.Test;
*/
public class IndexConfigurationUnitTests {
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void redisIndexSettingIndexNameDefaulted() {
String path = "path";
@@ -37,10 +34,7 @@ public class IndexConfigurationUnitTests {
assertThat(setting.getIndexName(), equalTo(path));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void redisIndexSettingIndexNameExplicit() {
String indexName = "indexName";
@@ -48,10 +42,7 @@ public class IndexConfigurationUnitTests {
assertThat(setting.getIndexName(), equalTo(indexName));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void redisIndexSettingIndexNameUsedInEquals() {
SimpleIndexDefinition setting1 = new SimpleIndexDefinition("keyspace", "path", "indexName1");
@@ -61,10 +52,7 @@ public class IndexConfigurationUnitTests {
assertThat(setting1, not(equalTo(setting2)));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void redisIndexSettingIndexNameUsedInHashCode() {
SimpleIndexDefinition setting1 = new SimpleIndexDefinition("keyspace", "path", "indexName1");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,10 +61,7 @@ public class BasicRedisPersistentEntityUnitTests<T, ID extends Serializable> {
entity = new BasicRedisPersistentEntity<T>(entityInformation, keySpaceResolver, ttlAccessor);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void addingMultipleIdPropertiesWithoutAnExplicitOneThrowsException() {
expectedException.expect(MappingException.class);
@@ -81,10 +78,7 @@ public class BasicRedisPersistentEntityUnitTests<T, ID extends Serializable> {
entity.addPersistentProperty(property2);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
@SuppressWarnings("unchecked")
public void addingMultipleExplicitIdPropertiesThrowsException() {
@@ -104,10 +98,7 @@ public class BasicRedisPersistentEntityUnitTests<T, ID extends Serializable> {
entity.addPersistentProperty(property2);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
@SuppressWarnings("unchecked")
public void explicitIdPropertiyShouldBeFavoredOverNonExplicit() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,26 +38,17 @@ public class ConfigAwareKeySpaceResolverUnitTests {
this.resolver = new ConfigAwareKeySpaceResolver(config);
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void resolveShouldThrowExceptionWhenTypeIsNull() {
resolver.resolveKeySpace(null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveShouldUseClassNameAsDefaultKeyspace() {
assertThat(resolver.resolveKeySpace(TypeWithoutAnySettings.class), is(TypeWithoutAnySettings.class.getName()));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void resolveShouldFavorConfiguredNameOverClassName() {
config.addKeyspaceSettings(new KeyspaceSettings(TypeWithoutAnySettings.class, "ji'e'toh"));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,26 +42,17 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
accessor = new ConfigAwareTimeToLiveAccessor(config, new RedisMappingContext());
}
/**
* @see DATAREDIS-425
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATAREDIS-425
public void getTimeToLiveShouldThrowExceptionWhenSourceObjectIsNull() {
accessor.getTimeToLive(null);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnNullIfNothingConfiguredOrAnnotated() {
assertThat(accessor.getTimeToLive(new SimpleType()), nullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnConfiguredValueForSimpleType() {
KeyspaceSettings setting = new KeyspaceSettings(SimpleType.class, null);
@@ -71,18 +62,12 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new SimpleType()), is(10L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnValueWhenTypeIsAnnotated() {
assertThat(accessor.getTimeToLive(new TypeWithRedisHashAnnotation()), is(5L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveConsidersAnnotationOverConfig() {
KeyspaceSettings setting = new KeyspaceSettings(TypeWithRedisHashAnnotation.class, null);
@@ -92,34 +77,22 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new TypeWithRedisHashAnnotation()), is(5L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnValueWhenPropertyIsAnnotatedAndHasValue() {
assertThat(accessor.getTimeToLive(new TypeWithRedisHashAnnotationAndTTLProperty(20L)), is(20L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnValueFromTypeAnnotationWhenPropertyIsAnnotatedAndHasNullValue() {
assertThat(accessor.getTimeToLive(new TypeWithRedisHashAnnotationAndTTLProperty()), is(10L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnNullWhenPropertyIsAnnotatedAndHasNullValue() {
assertThat(accessor.getTimeToLive(new SimpleTypeWithTTLProperty()), nullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnConfiguredValueWhenPropertyIsAnnotatedAndHasNullValue() {
KeyspaceSettings setting = new KeyspaceSettings(SimpleTypeWithTTLProperty.class, null);
@@ -129,10 +102,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new SimpleTypeWithTTLProperty()), is(10L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldFavorAnnotatedNotNullPropertyValueOverConfiguredOne() {
KeyspaceSettings setting = new KeyspaceSettings(SimpleTypeWithTTLProperty.class, null);
@@ -142,18 +112,12 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new SimpleTypeWithTTLProperty(25L)), is(25L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnMethodLevelTimeToLiveIfPresent() {
assertThat(accessor.getTimeToLive(new TypeWithTtlOnMethod(10L)), is(10L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnConfiguredValueWhenMethodLevelTimeToLiveIfPresentButHasNullValue() {
KeyspaceSettings setting = new KeyspaceSettings(TypeWithTtlOnMethod.class, null);
@@ -163,10 +127,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new TypeWithTtlOnMethod(null)), is(10L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void getTimeToLiveShouldReturnValueWhenMethodLevelTimeToLiveIfPresentAlthoughConfiguredValuePresent() {
KeyspaceSettings setting = new KeyspaceSettings(TypeWithTtlOnMethod.class, null);
@@ -176,10 +137,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(accessor.getTimeToLive(new TypeWithTtlOnMethod(100L)), is(100L));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void getTimeToLiveShouldReturnDefaultValue() {
Long ttl = accessor
@@ -188,10 +146,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(ttl, is(5L));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void getTimeToLiveShouldReturnValueWhenUpdateModifiesTtlProperty() {
Long ttl = accessor
@@ -201,10 +156,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(ttl, is(100L));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void getTimeToLiveShouldReturnPropertyValueWhenUpdateModifiesTtlProperty() {
Long ttl = accessor.getTimeToLive(new PartialUpdate<TypeWithRedisHashAnnotationAndTTLProperty>("123",
@@ -213,10 +165,7 @@ public class ConfigAwareTimeToLiveAccessorUnitTests {
assertThat(ttl, is(100L));
}
/**
* @see DATAREDIS-471
*/
@Test
@Test // DATAREDIS-471
public void getTimeToLiveShouldReturnDefaultValueWhenUpdateDoesNotModifyTtlProperty() {
Long ttl = accessor.getTimeToLive(new PartialUpdate<TypeWithRedisHashAnnotationAndTTLProperty>("123",

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -246,10 +246,7 @@ public abstract class AbstractDefaultScriptExecutorTests {
assertEquals("HELLO", scriptExecutor.execute(script, null));
}
/**
* @see DATAREDIS-356
*/
@Test
@Test // DATAREDIS-356
public void shouldTransparentlyReEvaluateScriptIfNotPresent() throws Exception {
this.template = new StringRedisTemplate();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,10 +53,7 @@ public class DefaultScriptExecutorUnitTests {
executor = new DefaultScriptExecutor<String>(template);
}
/**
* @see DATAREDIS-347
*/
@Test
@Test // DATAREDIS-347
public void excuteCheckForPresenceOfScriptViaEvalSha1() {
when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenReturn("FOO".getBytes());
@@ -66,10 +63,7 @@ public class DefaultScriptExecutorUnitTests {
verify(redisConnectionMock, times(1)).evalSha(anyString(), any(ReturnType.class), anyInt());
}
/**
* @see DATAREDIS-347
*/
@Test
@Test // DATAREDIS-347
public void excuteShouldNotCallEvalWhenSha1Exists() {
when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenReturn("FOO".getBytes());
@@ -79,10 +73,7 @@ public class DefaultScriptExecutorUnitTests {
verify(redisConnectionMock, never()).eval(any(byte[].class), any(ReturnType.class), anyInt());
}
/**
* @see DATAREDIS-347
*/
@Test
@Test // DATAREDIS-347
public void excuteShouldUseEvalInCaseNoSha1PresentForGivenScript() {
when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenThrow(
@@ -93,10 +84,7 @@ public class DefaultScriptExecutorUnitTests {
verify(redisConnectionMock, times(1)).eval(any(byte[].class), any(ReturnType.class), anyInt());
}
/**
* @see DATAREDIS-347
*/
@Test(expected = UnsupportedOperationException.class)
@Test(expected = UnsupportedOperationException.class) // DATAREDIS-347
public void excuteShouldThrowExceptionInCaseEvalShaFailsWithOtherThanRedisSystemException() {
when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenThrow(
@@ -105,10 +93,7 @@ public class DefaultScriptExecutorUnitTests {
executor.execute(SCRIPT, null);
}
/**
* @see DATAREDIS-347
*/
@Test(expected = RedisSystemException.class)
@Test(expected = RedisSystemException.class) // DATAREDIS-347
public void excuteShouldThrowExceptionInCaseEvalShaFailsWithAlthoughTheScriptExists() {
when(redisConnectionMock.evalSha(anyString(), any(ReturnType.class), anyInt())).thenThrow(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,10 +28,7 @@ import org.junit.Test;
*/
public class ExpirationUnitTests {
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void fromDefault() throws Exception {
Expiration expiration = Expiration.from(5, null);
@@ -40,10 +37,7 @@ public class ExpirationUnitTests {
assertThat(expiration.getTimeUnit(), is(TimeUnit.SECONDS));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void fromNanos() throws Exception {
Expiration expiration = Expiration.from(5L * 1000 * 1000, TimeUnit.NANOSECONDS);
@@ -52,10 +46,7 @@ public class ExpirationUnitTests {
assertThat(expiration.getTimeUnit(), is(TimeUnit.MILLISECONDS));
}
/**
* @see DATAREDIS-316
*/
@Test
@Test // DATAREDIS-316
public void fromMinutes() throws Exception {
Expiration expiration = Expiration.from(5, TimeUnit.MINUTES);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,10 +81,7 @@ public class KeyExpirationEventMessageListenerTests {
}
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void listenerShouldPublishEventCorrectly() throws InterruptedException {
byte[] key = ("to-expire:" + UUID.randomUUID().toString()).getBytes();
@@ -110,10 +107,7 @@ public class KeyExpirationEventMessageListenerTests {
assertThat((byte[]) captor.getValue().getSource(), is(key));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void listenerShouldNotReactToDeleteEvents() throws InterruptedException {
byte[] key = ("to-delete:" + UUID.randomUUID().toString()).getBytes();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,10 +53,7 @@ public class KeyExpirationEventMessageListenerUnitTests {
listener.setApplicationEventPublisher(publisherMock);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void handleMessageShouldPublishKeyExpiredEvent() {
listener.onMessage(MESSAGE, "*".getBytes());
@@ -68,10 +65,7 @@ public class KeyExpirationEventMessageListenerUnitTests {
assertThat((byte[]) captor.getValue().getSource(), is(MESSAGE_BODY.getBytes()));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void handleMessageShouldNotRespondToNullMessage() {
listener.onMessage(null, "*".getBytes());
@@ -79,10 +73,7 @@ public class KeyExpirationEventMessageListenerUnitTests {
verifyZeroInteractions(publisherMock);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void handleMessageShouldNotRespondToEmptyMessage() {
listener.onMessage(new DefaultMessage(null, null), "*".getBytes());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2013 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -175,11 +175,8 @@ public class PubSubTests<T> {
container.start();
}
/**
* @see DATAREDIS-251
*/
@SuppressWarnings("unchecked")
@Test
@Test // DATAREDIS-251
public void testStartListenersToNoSpecificChannelTest() throws InterruptedException {
container.removeMessageListener(adapter, new ChannelTopic(CHANNEL));
container.addMessageListener(adapter, Arrays.asList(new PatternTopic("*")));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,10 +79,7 @@ public class RedisMessageListenerContainerTests {
connectionFactory.destroy();
}
/*
* @see DATAREDIS-415
*/
@Test
@Test // DATAREDIS-415
public void interruptAtStart() throws Exception {
final Thread main = Thread.currentThread();

View File

@@ -140,7 +140,7 @@ public class SubscriptionConnectionTests {
if (connectionFactory instanceof JedisConnectionFactory) {
// Need to sleep shortly as jedis cannot deal propery with multiple repsonses within one connection
// @see https://github.com/xetorthio/jedis/issues/186
// see https://github.com/xetorthio/jedis/issues/186
Thread.sleep(100);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -139,10 +139,7 @@ public class MessageListenerTest {
verify(target).customMethodWithChannel(PAYLOAD, CHANNEL);
}
/**
* @see DATAREDIS-92
*/
@Test
@Test // DATAREDIS-92
public void triggersListenerImplementingInterfaceCorrectly() {
SampleListener listener = new SampleListener();
@@ -158,10 +155,7 @@ public class MessageListenerTest {
assertEquals(1, listener.count);
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void defaultConcreteHandlerMethodShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -174,10 +168,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handleMessage(anyString(), anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void defaultConcreteHandlerMethodWithoutSerializerShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -191,10 +182,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handleMessage(any(byte[].class), anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void defaultConcreteHandlerMethodWithCustomSerializerShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -208,10 +196,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handleMessage(any(Pojo.class), anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void customConcreteHandlerMethodShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -225,10 +210,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handle(anyString(), anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void customConcreteMessageOnlyHandlerMethodShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -242,10 +224,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handleMessageOnly(anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void customConcreteHandlerMethodWithoutSerializerShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -260,10 +239,7 @@ public class MessageListenerTest {
verify(listener, times(1)).handle(any(byte[].class), anyString());
}
/**
* @see DATAREDIS-337
*/
@Test
@Test // DATAREDIS-337
public void customConcreteHandlerMethodWithCustomSerializerShouldOnlyBeInvokedOnce() {
ConcreteMessageHandler listener = spy(new ConcreteMessageHandler());
@@ -289,7 +265,6 @@ public class MessageListenerTest {
/**
* @author Thomas Darimont
* @see DATAREDIS-337
*/
static class AbstractMessageHandler {
@@ -310,7 +285,6 @@ public class MessageListenerTest {
/**
* @author Thomas Darimont
* @see DATAREDIS-337
*/
static class ConcreteMessageHandler extends AbstractMessageHandler {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,10 +55,7 @@ public abstract class AbstractHashMapperTest {
assertBackAndForwardMapping(new Person("George", "Enescu", 74, new Address("liveni", 19)));
}
/**
* @see DATAREDIS-421
*/
@Test
@Test // DATAREDIS-421
public void toHashShouldTreatNullValuesCorrectly() {
Person source = new Person("rand", null, 19);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,10 +78,7 @@ public class Jackson2HashMapperTests {
this.mapper = new Jackson2HashMapper(true);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldWriteReadHashCorrectly() {
Person jon = new Person("jon", "snow", 19);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,10 +58,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
return this.mapper;
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapTypedListOfSimpleType() {
WithList source = new WithList();
@@ -69,10 +66,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapTypedListOfComplexType() {
WithList source = new WithList();
@@ -81,10 +75,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapTypedListOfComplexObjectWihtNestedElements() {
WithList source = new WithList();
@@ -99,10 +90,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapNestedObject() {
Person jon = new Person("jon", "snow", 19);
@@ -114,10 +102,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(jon);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapUntypedList() {
WithList source = new WithList();
@@ -125,10 +110,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapTypedMapOfSimpleTypes() {
WithMap source = new WithMap();
@@ -139,10 +121,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapTypedMapOfComplexTypes() {
WithMap source = new WithMap();
@@ -152,10 +131,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void shouldMapUntypedMap() {
WithMap source = new WithMap();
@@ -166,10 +142,7 @@ public class Jackson2HashMapperUnitTests extends AbstractHashMapperTest {
assertBackAndForwardMapping(source);
}
/**
* @see DATAREDIS-423
*/
@Test
@Test // DATAREDIS-423
public void nestedStuff() {
WithList nestedList = new WithList();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,18 +33,12 @@ public class ObjectHashMapperTests extends AbstractHashMapperTest {
return new ObjectHashMapper();
}
/**
* @see DATAREDIS-503
*/
@Test
@Test // DATAREDIS-503
public void testSimpleType() {
assertBackAndForwardMapping(new Integer(100));
}
/**
* @see DATAREDIS-503
*/
@Test
@Test // DATAREDIS-503
public void fromHashShouldCastToType() {
ObjectHashMapper objectHashMapper = new ObjectHashMapper();
@@ -55,10 +49,7 @@ public class ObjectHashMapperTests extends AbstractHashMapperTest {
assertThat(result, is(equalTo(new Integer(100))));
}
/**
* @see DATAREDIS-503
*/
@Test(expected = ClassCastException.class)
@Test(expected = ClassCastException.class) // DATAREDIS-503
public void fromHashShouldFailIfTypeDoesNotMatch() {
ObjectHashMapper objectHashMapper = new ObjectHashMapper();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,10 +66,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
kvTemplate.delete(City.class);
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void simpleFindShouldReturnEntitiesCorrectly() {
Person rand = new Person();
@@ -95,10 +92,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findByLastname("al'thor"), hasItem(rand));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void simpleFindByMultipleProperties() {
Person egwene = new Person();
@@ -117,10 +111,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findByFirstnameAndLastname("egwene", "al'vere").get(0), is(egwene));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findReturnsReferenceDataCorrectly() {
// Prepare referenced data entry
@@ -150,10 +141,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(reLoaded.city, IsNull.nullValue());
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findReturnsPageCorrectly() {
Person eddard = new Person("eddard", "stark");
@@ -176,10 +164,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(page2.getTotalElements(), is(6L));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findUsingOrReturnsResultCorrectly() {
Person eddard = new Person("eddard", "stark");
@@ -194,10 +179,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(eddardAndJon, containsInAnyOrder(eddard, jon));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldApplyFirstKeywordCorrectly() {
Person eddard = new Person("eddard", "stark");
@@ -209,10 +191,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findFirstBy(), hasSize(1));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldApplyPageableCorrectlyWhenUsingFindAll() {
Person eddard = new Person("eddard", "stark");
@@ -226,10 +205,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findAll(firstPage.nextPageable()).getContent(), hasSize(1));
}
/**
* @see DATAREDIS-551
*/
@Test
@Test // DATAREDIS-551
public void shouldApplyPageableCorrectlyWhenUsingFindByWithoutCriteria() {
Person eddard = new Person("eddard", "stark");
@@ -244,10 +220,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findBy(firstPage.nextPageable()).getContent(), hasSize(1));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldReturnEmptyListWhenPageableOutOfBoundsUsingFindAll() {
Person eddard = new Person("eddard", "stark");
@@ -260,10 +233,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(firstPage.getContent(), hasSize(0));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldReturnEmptyListWhenPageableOutOfBoundsUsingQueryMethod() {
Person eddard = new Person("eddard", "stark");
@@ -285,10 +255,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(page2.getTotalElements(), is(3L));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldApplyTopKeywordCorrectly() {
Person eddard = new Person("eddard", "stark");
@@ -300,10 +267,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(repo.findTop2By(), hasSize(2));
}
/**
* @see DATAREDIS-547
*/
@Test
@Test // DATAREDIS-547
public void shouldApplyTopKeywordCorrectlyWhenCriteriaPresent() {
Person eddard = new Person("eddard", "stark");
@@ -322,10 +286,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
}
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void nearQueryShouldReturnResultsCorrectly() {
City palermo = new City();
@@ -344,10 +305,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(result, not(hasItems(palermo)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void nearQueryShouldFindNothingIfOutOfRange() {
City palermo = new City();
@@ -362,10 +320,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
assertThat(result, is(empty()));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void nearQueryShouldReturnResultsCorrectlyOnNestedProperty() {
City palermo = new City();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,10 +51,7 @@ public class CdiExtensionIntegrationTests {
LOGGER.debug("CDI container bootstrapped!");
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
@SuppressWarnings("rawtypes")
public void beanShouldBeRegistered() {
@@ -64,10 +61,7 @@ public class CdiExtensionIntegrationTests {
assertThat(beans.iterator().next().getScope(), is(equalTo((Class) ApplicationScoped.class)));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void saveAndFindUnqualified() {
RepositoryConsumer repositoryConsumer = container.getInstance(RepositoryConsumer.class);
@@ -81,10 +75,7 @@ public class CdiExtensionIntegrationTests {
assertThat(result, contains(person));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void saveAndFindQualified() {
RepositoryConsumer repositoryConsumer = container.getInstance(RepositoryConsumer.class);
@@ -99,10 +90,7 @@ public class CdiExtensionIntegrationTests {
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void callMethodOnCustomRepositoryShouldSuceed() {
RepositoryConsumer repositoryConsumer = container.getInstance(RepositoryConsumer.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,36 +58,24 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
extension = new RedisRepositoryConfigurationExtension();
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void isStrictMatchIfDomainTypeIsAnnotatedWithDocument() {
assertHasRepo(SampleRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void isStrictMatchIfRepositoryExtendsStoreSpecificBase() {
assertHasRepo(StoreRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void isNotStrictMatchIfDomainTypeIsNotAnnotatedWithDocument() {
assertDoesNotHaveRepo(UnannotatedRepository.class,
extension.getRepositoryConfigurations(configurationSource, loader, true));
}
/**
* @see DATAREDIS-491
*/
@Test
@Test // DATAREDIS-491
public void picksUpEnableKeyspaceEventsOnStartupCorrectly() {
metadata = new StandardAnnotationMetadata(Config.class, true);
@@ -96,10 +84,7 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
assertThat(getEnableKeyspaceEvents(beanDefintionRegistry), equalTo((Object) EnableKeyspaceEvents.ON_STARTUP));
}
/**
* @see DATAREDIS-491
*/
@Test
@Test // DATAREDIS-491
public void picksUpEnableKeyspaceEventsDefaultCorrectly() {
metadata = new StandardAnnotationMetadata(ConfigWithKeyspaceEventsDisabled.class, true);
@@ -108,10 +93,7 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
assertThat(getEnableKeyspaceEvents(beanDefintionRegistry), equalTo((Object) EnableKeyspaceEvents.OFF));
}
/**
* @see DATAREDIS-505
*/
@Test
@Test // DATAREDIS-505
public void picksUpDefaultKeyspaceNotificationsConfigParameterCorrectly() {
metadata = new StandardAnnotationMetadata(Config.class, true);
@@ -120,10 +102,7 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
assertThat(getKeyspaceNotificationsConfigParameter(beanDefintionRegistry), equalTo((Object) "Ex"));
}
/**
* @see DATAREDIS-505
*/
@Test
@Test // DATAREDIS-505
public void picksUpCustomKeyspaceNotificationsConfigParameterCorrectly() {
metadata = new StandardAnnotationMetadata(ConfigWithKeyspaceEventsEnabledAndCustomEventConfig.class, true);

View File

@@ -1,6 +1,5 @@
package org.springframework.data.redis.repository.configuration;
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,6 +13,7 @@ package org.springframework.data.redis.repository.configuration;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.redis.repository.configuration;
import static org.hamcrest.core.Is.*;
import static org.hamcrest.core.IsEqual.*;
@@ -86,10 +86,7 @@ public class RedisRepositoryConfigurationUnitTests {
@Autowired ApplicationContext ctx;
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldPickUpReferenceResolver() {
RedisKeyValueAdapter adapter = (RedisKeyValueAdapter) ctx.getBean("redisKeyValueAdapter");
@@ -118,18 +115,12 @@ public class RedisRepositoryConfigurationUnitTests {
@Autowired ApplicationContext ctx;
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldInitWithDefaults() {
assertThat(ctx.getBean(ContextSampleRepository.class), is(notNullValue()));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void shouldRegisterDefaultBeans() {
assertThat(ctx.getBean(ContextSampleRepository.class), is(notNullValue()));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,10 +35,7 @@ public class MappingRedisEntityInformationUnitTests<T, ID extends Serializable>
@Mock RedisPersistentEntity<T> entity;
/**
* @see DATAREDIS-425
*/
@Test(expected = MappingException.class)
@Test(expected = MappingException.class) // DATAREDIS-425
@SuppressWarnings("unchecked")
public void throwsMappingExceptionWhenNoIdPropertyPresent() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,10 +52,7 @@ public class RedisQueryCreatorUnitTests {
private @Mock RepositoryMetadata metadataMock;
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findBySingleSimpleProperty() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -67,10 +64,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getSismember(), hasItem(new PathAndValue("firstname", "eddard")));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findByMultipleSimpleProperties() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -84,10 +78,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getSismember(), hasItem(new PathAndValue("age", 43)));
}
/**
* @see DATAREDIS-425
*/
@Test
@Test // DATAREDIS-425
public void findByMultipleSimplePropertiesUsingOr() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -101,10 +92,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getOrSismember(), hasItem(new PathAndValue("firstname", "eddard")));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findWithinCircle() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -118,10 +106,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getNear().getDistance(), is(new Distance(200, Metrics.KILOMETERS)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findNearWithPointAndDistance() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -135,10 +120,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getNear().getDistance(), is(new Distance(200, Metrics.KILOMETERS)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findNearWithPointAndNumericValueDefaultsToKilometers() throws SecurityException, NoSuchMethodException {
RedisQueryCreator creator = createQueryCreatorForMethodWithArgs(
@@ -152,10 +134,7 @@ public class RedisQueryCreatorUnitTests {
assertThat(query.getCritieria().getNear().getDistance(), is(new Distance(200, Metrics.KILOMETERS)));
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findNearWithInvalidShapeParameter() throws SecurityException, NoSuchMethodException {
exception.expect(InvalidDataAccessApiUsageException.class);
@@ -168,10 +147,7 @@ public class RedisQueryCreatorUnitTests {
creator.createQuery();
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findNearWithInvalidDistanceParameter() throws SecurityException, NoSuchMethodException {
exception.expect(InvalidDataAccessApiUsageException.class);
@@ -184,10 +160,7 @@ public class RedisQueryCreatorUnitTests {
creator.createQuery();
}
/**
* @see DATAREDIS-533
*/
@Test
@Test // DATAREDIS-533
public void findNearWithMissingDistanceParameter() throws SecurityException, NoSuchMethodException {
exception.expect(InvalidDataAccessApiUsageException.class);

Some files were not shown because too many files have changed in this diff Show More