From ceea66e17eefa420b3520dc9426433c0f2d708ca Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 11 Jan 2017 14:53:13 +0100 Subject: [PATCH] DATAREDIS-563 - Migrate ticket references in test code to Spring Framework style. Fix license headers by removing the dot after the year. --- .../ReactiveClusterGeoCommands.java | 2 +- .../ReactiveClusterHashCommands.java | 2 +- .../ReactiveClusterHyperLogLogCommands.java | 2 +- .../ReactiveClusterKeyCommands.java | 2 +- .../ReactiveClusterListCommands.java | 2 +- .../ReactiveClusterNumberCommands.java | 2 +- .../ReactiveClusterSetCommands.java | 2 +- .../ReactiveClusterStringCommands.java | 2 +- .../ReactiveClusterZSetCommands.java | 2 +- .../ReactiveRedisClusterConnection.java | 2 +- .../LettuceReactiveClusterGeoCommands.java | 2 +- .../LettuceReactiveClusterHashCommands.java | 2 +- ...uceReactiveClusterHyperLogLogCommands.java | 2 +- .../LettuceReactiveClusterKeyCommands.java | 2 +- .../LettuceReactiveClusterListCommands.java | 2 +- .../LettuceReactiveClusterNumberCommands.java | 2 +- .../LettuceReactiveClusterSetCommands.java | 2 +- .../LettuceReactiveClusterStringCommands.java | 2 +- .../LettuceReactiveClusterZSetCommands.java | 2 +- ...LettuceReactiveRedisClusterConnection.java | 2 +- ...disCacheManagerTransactionalUnitTests.java | 7 +- .../cache/RedisCacheManagerUnitTests.java | 42 +- .../data/redis/cache/RedisCacheTest.java | 64 +- .../data/redis/cache/RedisCacheUnitTests.java | 77 +- ...lRedisCacheManagerWithCommitUnitTests.java | 7 +- ...edisCacheManagerWithRollbackUnitTests.java | 7 +- .../AbstractConnectionIntegrationTests.java | 228 +--- ...actConnectionPipelineIntegrationTests.java | 7 +- ...ConnectionTransactionIntegrationTests.java | 7 +- .../AbstractTransactionalTestBase.java | 27 +- .../ClusterCommandExecutorUnitTests.java | 88 +- .../connection/ClusterConnectionTests.java | 810 ++++--------- ...ultStringRedisConnectionPipelineTests.java | 137 +-- ...tStringRedisConnectionPipelineTxTests.java | 136 +-- .../DefaultStringRedisConnectionTests.java | 177 +-- .../DefaultStringRedisConnectionTxTests.java | 132 +-- .../RedisClusterConfigurationUnitTests.java | 47 +- .../connection/RedisConnectionUnitTests.java | 12 +- .../RedisSentinelConfigurationUnitTests.java | 47 +- .../convert/ConvertersUnitTests.java | 27 +- .../jedis/JedisClusterConnectionTests.java | 1017 ++++------------- .../JedisClusterConnectionUnitTests.java | 107 +- .../jedis/JedisConnectionFactoryTests.java | 12 +- .../JedisConnectionFactoryUnitTests.java | 23 +- .../JedisConnectionIntegrationTests.java | 32 +- ...disConnectionPipelineIntegrationTests.java | 17 +- ...sConnectionPipelineTxIntegrationTests.java | 7 +- ...ConnectionTransactionIntegrationTests.java | 12 +- .../jedis/JedisConnectionUnitTestSuite.java | 192 +--- .../jedis/JedisConvertersUnitTests.java | 132 +-- .../JedisExceptionConverterUnitTests.java | 17 +- .../JedisSentinelConnectionUnitTests.java | 82 +- .../jedis/JedisSentinelIntegrationTests.java | 17 +- ...TransactionalConnectionStarvationTest.java | 22 +- .../lettuce/DefaultLettucePoolTests.java | 12 +- .../LettuceClusterConnectionTests.java | 1012 ++++------------ .../LettuceClusterConnectionUnitTests.java | 122 +- .../LettuceConnectionFactoryTests.java | 17 +- .../LettuceConnectionFactoryUnitTests.java | 62 +- .../LettuceConnectionIntegrationTests.java | 17 +- ...uceConnectionPipelineIntegrationTests.java | 7 +- ...eConnectionPipelineTxIntegrationTests.java | 7 +- .../LettuceConnectionUnitTestSuite.java | 87 +- .../lettuce/LettuceConvertersUnitTests.java | 62 +- ...ttuceReactiveClusterCommandsTestsBase.java | 3 +- ...activeClusterHyperLogLogCommandsTests.java | 29 +- ...ettuceReactiveClusterKeyCommandsTests.java | 13 +- ...ttuceReactiveClusterListCommandsTests.java | 29 +- ...uceReactiveClusterStringCommandsTests.java | 28 +- ...ttuceReactiveClusterZSetCommandsTests.java | 29 +- .../LettuceReactiveGeoCommandsTests.java | 72 +- .../LettuceReactiveHashCommandsTests.java | 82 +- ...ttuceReactiveHyperLogLogCommandsTests.java | 27 +- .../LettuceReactiveKeyCommandsTests.java | 72 +- .../LettuceReactiveListCommandTests.java | 107 +- .../LettuceReactiveNumberCommandsTests.java | 32 +- .../LettuceReactiveSetCommandsTests.java | 107 +- .../LettuceReactiveStringCommandsTests.java | 147 +-- .../LettuceReactiveZSetCommandsTests.java | 192 +--- .../LettuceSentinelConnectionUnitTests.java | 77 +- .../LettuceSentinelIntegrationTests.java | 17 +- .../core/AbstractOperationsTestParams.java | 6 +- ...nnectionSplittingInterceptorUnitTests.java | 17 +- .../DefaultClusterOperationsUnitTests.java | 147 +-- .../redis/core/DefaultGeoOperationsTests.java | 87 +- .../core/DefaultHashOperationsTests.java | 7 +- .../DefaultHyperLogLogOperationsTests.java | 28 +- .../core/DefaultListOperationsTests.java | 42 +- .../redis/core/DefaultSetOperationsTests.java | 12 +- .../core/DefaultTypedTupleUnitTests.java | 17 +- .../core/DefaultValueOperationsTests.java | 17 +- .../core/DefaultZSetOperationsTests.java | 27 +- .../data/redis/core/IndexWriterUnitTests.java | 57 +- .../core/MultithreadedRedisTemplateTests.java | 7 +- .../redis/core/RedisCommandUnitTests.java | 47 +- .../redis/core/RedisKeyValueAdapterTests.java | 117 +- .../core/RedisKeyValueAdapterUnitTests.java | 33 +- .../core/RedisKeyValueTemplateTests.java | 102 +- .../data/redis/core/RedisTemplateTests.java | 52 +- .../redis/core/RedisTemplateUnitTests.java | 22 +- .../data/redis/core/ScanCursorUnitTests.java | 52 +- .../CompositeIndexResolverUnitTests.java | 17 +- .../MappingRedisConverterUnitTests.java | 583 ++-------- .../convert/PathIndexResolverUnitTests.java | 148 +-- .../convert/SpelIndexResolverUnitTests.java | 42 +- .../index/IndexConfigurationUnitTests.java | 22 +- .../BasicRedisPersistentEntityUnitTests.java | 17 +- .../ConfigAwareKeySpaceResolverUnitTests.java | 17 +- ...onfigAwareTimeToLiveAccessorUnitTests.java | 87 +- .../AbstractDefaultScriptExecutorTests.java | 7 +- .../DefaultScriptExecutorUnitTests.java | 27 +- .../redis/core/types/ExpirationUnitTests.java | 17 +- ...eyExpirationEventMessageListenerTests.java | 12 +- ...pirationEventMessageListenerUnitTests.java | 17 +- .../data/redis/listener/PubSubTests.java | 7 +- .../RedisMessageListenerContainerTests.java | 7 +- .../listener/SubscriptionConnectionTests.java | 2 +- .../listener/adapter/MessageListenerTest.java | 44 +- .../redis/mapping/AbstractHashMapperTest.java | 7 +- .../mapping/Jackson2HashMapperTests.java | 7 +- .../mapping/Jackson2HashMapperUnitTests.java | 47 +- .../redis/mapping/ObjectHashMapperTests.java | 17 +- .../RedisRepositoryIntegrationTestBase.java | 77 +- .../cdi/CdiExtensionIntegrationTests.java | 22 +- ...sitoryConfigurationExtensionUnitTests.java | 37 +- ...RedisRepositoryConfigurationUnitTests.java | 19 +- ...appingRedisEntityInformationUnitTests.java | 7 +- .../query/RedisQueryCreatorUnitTests.java | 47 +- ...cJackson2JsonRedisSerializerUnitTests.java | 62 +- .../Jackson2JsonRedisSerializerTests.java | 27 +- .../SimpleRedisSerializerTests.java | 7 +- .../redis/support/BoundKeyOperationsTest.java | 12 +- .../atomic/RedisAtomicDoubleTests.java | 27 +- .../atomic/RedisAtomicIntegerTests.java | 47 +- .../support/atomic/RedisAtomicLongTests.java | 47 +- .../AbstractRedisCollectionUnitTests.java | 12 +- .../collections/AbstractRedisMapTests.java | 7 +- .../collections/AbstractRedisSetTests.java | 6 +- .../collections/AbstractRedisZSetTest.java | 27 +- .../support/collections/RedisMapTests.java | 6 +- .../collections/RedisPropertiesTests.java | 6 +- 141 files changed, 1882 insertions(+), 6950 deletions(-) diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java index 3821d9d5a..56386c1d4 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java index 382ff2176..2a1f88f8c 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java index d9e876240..13cbb5ddf 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java index 8ec8d5be1..92219e9e2 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java index 1beb312de..c3c8fd28f 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java index 4004b0a0e..93a3ed702 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java index 1c13c5b33..11ef2651a 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java index 3da9aa896..be131688e 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java index 7ce705a43..a429cb2a6 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java index 848525f49..b52563561 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterGeoCommands.java index 97fe924b0..4a8fd6148 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterGeoCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterGeoCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHashCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHashCommands.java index 5b7996da4..a33f1fafd 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHashCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommands.java index 3cb19d220..34f204073 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommands.java index 43d02dce3..5250f7225 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommands.java index 2ce7601c6..228293509 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterNumberCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterNumberCommands.java index 145f35d7a..a20f33f0e 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterNumberCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterNumberCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterSetCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterSetCommands.java index a9144fa74..c7673b612 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterSetCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommands.java index 54abc250f..887637122 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommands.java index f14892bf5..dabf252ac 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommands.java @@ -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. diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveRedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveRedisClusterConnection.java index 61aa49c1c..efb73a590 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveRedisClusterConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveRedisClusterConnection.java @@ -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. diff --git a/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerTransactionalUnitTests.java b/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerTransactionalUnitTests.java index aa7a9a621..7980e39a0 100644 --- a/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerTransactionalUnitTests.java +++ b/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerTransactionalUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerUnitTests.java b/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerUnitTests.java index 8b06c4cdb..aadd2d0f7 100644 --- a/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerUnitTests.java +++ b/src/test/java/org/springframework/data/redis/cache/RedisCacheManagerUnitTests.java @@ -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 keys = new HashSet(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. 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 keys = new HashSet(Arrays.asList(redisTemplate.getKeySerializer() diff --git a/src/test/java/org/springframework/data/redis/cache/RedisCacheTest.java b/src/test/java/org/springframework/data/redis/cache/RedisCacheTest.java index dbf6a9c0b..70025747b 100644 --- a/src/test/java/org/springframework/data/redis/cache/RedisCacheTest.java +++ b/src/test/java/org/springframework/data/redis/cache/RedisCacheTest.java @@ -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. @@ -229,10 +229,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertFalse(monitorStateException.get()); } - /** - * @see DATAREDIS-243 - */ - @Test + @Test // DATAREDIS-243 public void testCacheGetShouldReturnCachedInstance() { assumeThat(cache, instanceOf(RedisCache.class)); @@ -243,10 +240,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(value, isEqual(((RedisCache) cache).get(key, Object.class))); } - /** - * @see DATAREDIS-243 - */ - @Test + @Test // DATAREDIS-243 public void testCacheGetShouldRetunInstanceOfCorrectType() { assumeThat(cache, instanceOf(RedisCache.class)); @@ -258,10 +252,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(redisCache.get(key, value.getClass()), IsInstanceOf.instanceOf(value.getClass())); } - /** - * @see DATAREDIS-243 - */ - @Test(expected = ClassCastException.class) + @Test(expected = ClassCastException.class) // DATAREDIS-243 public void testCacheGetShouldThrowExceptionOnInvalidType() { assumeThat(cache, instanceOf(RedisCache.class)); @@ -274,10 +265,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { Cache retrievedObject = redisCache.get(key, Cache.class); } - /** - * @see DATAREDIS-243 - */ - @Test + @Test // DATAREDIS-243 public void testCacheGetShouldReturnNullIfNoCachedValueFound() { assumeThat(cache, instanceOf(RedisCache.class)); @@ -291,11 +279,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { 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)); @@ -318,10 +302,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(wrapper.get(), equalTo(value)); } - /** - * @see DATAREDIS-510 - */ - @Test + @Test // DATAREDIS-510 public void cachePutWithNullShouldNotAddStuffToRedis() { assumeThat(getAllowCacheNullValues(), is(false)); @@ -334,10 +315,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(cache.get(key), is(nullValue())); } - /** - * @see DATAREDIS-510 - */ - @Test + @Test // DATAREDIS-510 public void cachePutWithNullShouldRemoveKeyIfExists() { assumeThat(getAllowCacheNullValues(), is(false)); @@ -354,11 +332,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { 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)); @@ -367,10 +341,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { runOnce(new CacheGetWithValueLoaderIsThreadSafe((RedisCache) cache)); } - /** - * @see DATAREDIS-553 - */ - @Test + @Test // DATAREDIS-553 public void cachePutWithNullShouldAddStuffToRedisWhenCachingNullIsEnabled() { assumeThat(getAllowCacheNullValues(), is(true)); @@ -383,10 +354,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(cache.get(key, String.class), is(nullValue())); } - /** - * @see DATAREDIS-553 - */ - @Test + @Test // DATAREDIS-553 public void testCacheGetSynchronizedNullAllowingNull() { assumeThat(getAllowCacheNullValues(), is(true)); @@ -404,10 +372,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(cache.get(key).get(), is(nullValue())); } - /** - * @see DATAREDIS-553 - */ - @Test + @Test // DATAREDIS-553 public void testCacheGetSynchronizedNullNotAllowingNull() { assumeThat(getAllowCacheNullValues(), is(false)); @@ -426,10 +391,7 @@ public class RedisCacheTest extends AbstractNativeCacheTest { assertThat(cache.get(key), is(nullValue())); } - /** - * @see DATAREDIS-553 - */ - @Test + @Test // DATAREDIS-553 public void testCacheGetSynchronizedNullWithStoredNull() { assumeThat(getAllowCacheNullValues(), is(true)); diff --git a/src/test/java/org/springframework/data/redis/cache/RedisCacheUnitTests.java b/src/test/java/org/springframework/data/redis/cache/RedisCacheUnitTests.java index e8ac69a15..d5b9b3940 100644 --- a/src/test/java/org/springframework/data/redis/cache/RedisCacheUnitTests.java +++ b/src/test/java/org/springframework/data/redis/cache/RedisCacheUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithCommitUnitTests.java b/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithCommitUnitTests.java index cb4fae112..d44766ae4 100644 --- a/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithCommitUnitTests.java +++ b/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithCommitUnitTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithRollbackUnitTests.java b/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithRollbackUnitTests.java index 3f690c13d..754a744a4 100644 --- a/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithRollbackUnitTests.java +++ b/src/test/java/org/springframework/data/redis/cache/TransactionalRedisCacheManagerWithRollbackUnitTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionIntegrationTests.java index 209a5bc62..d0852aa9c 100644 --- a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionIntegrationTests.java @@ -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) 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) 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) 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) 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>) 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>) 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() { diff --git a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionPipelineIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionPipelineIntegrationTests.java index 4751403cd..93c4d4bf2 100644 --- a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionPipelineIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionPipelineIntegrationTests.java @@ -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() { diff --git a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionTransactionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionTransactionIntegrationTests.java index 84cc78610..8517fdd25 100644 --- a/src/test/java/org/springframework/data/redis/connection/AbstractConnectionTransactionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/AbstractConnectionTransactionIntegrationTests.java @@ -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() { diff --git a/src/test/java/org/springframework/data/redis/connection/AbstractTransactionalTestBase.java b/src/test/java/org/springframework/data/redis/connection/AbstractTransactionalTestBase.java index e98099f54..fd0020d96 100644 --- a/src/test/java/org/springframework/data/redis/connection/AbstractTransactionalTestBase.java +++ b/src/test/java/org/springframework/data/redis/connection/AbstractTransactionalTestBase.java @@ -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. @@ -112,11 +112,8 @@ public abstract class AbstractTransactionalTestBase { connection.close(); } - /** - * @see DATAREDIS-73 - */ @Rollback(true) - @Test + @Test // DATAREDIS-73 public void valueOperationSetShouldBeRolledBackCorrectly() { for (String key : KEYS) { @@ -124,11 +121,8 @@ public abstract class AbstractTransactionalTestBase { } } - /** - * @see DATAREDIS-73 - */ @Rollback(false) - @Test + @Test // DATAREDIS-73 public void valueOperationSetShouldBeCommittedCorrectly() { this.valuesShouldHaveBeenPersisted = true; @@ -137,10 +131,7 @@ public abstract class AbstractTransactionalTestBase { } } - /** - * @see DATAREDIS-548 - */ - @Test + @Test // DATAREDIS-548 @Transactional(readOnly = true) public void valueOperationShouldWorkWithReadOnlyTransactions() { @@ -150,11 +141,8 @@ public abstract class AbstractTransactionalTestBase { } } - /** - * @see DATAREDIS-73 - */ @Rollback(true) - @Test + @Test // DATAREDIS-73 public void listOperationLPushShoudBeRolledBackCorrectly() { for (String key : KEYS) { @@ -162,11 +150,8 @@ public abstract class AbstractTransactionalTestBase { } } - /** - * @see DATAREDIS-73 - */ @Rollback(false) - @Test + @Test // DATAREDIS-73 public void listOperationLPushShouldBeCommittedCorrectly() { this.valuesShouldHaveBeenPersisted = true; diff --git a/src/test/java/org/springframework/data/redis/connection/ClusterCommandExecutorUnitTests.java b/src/test/java/org/springframework/data/redis/connection/ClusterCommandExecutorUnitTests.java index fd1bd31d4..f974f9854 100644 --- a/src/test/java/org/springframework/data/redis/connection/ClusterCommandExecutorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/ClusterCommandExecutorUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/connection/ClusterConnectionTests.java b/src/test/java/org/springframework/data/redis/connection/ClusterConnectionTests.java index 6eac68666..1bf559015 100644 --- a/src/test/java/org/springframework/data/redis/connection/ClusterConnectionTests.java +++ b/src/test/java/org/springframework/data/redis/connection/ClusterConnectionTests.java @@ -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. @@ -27,1014 +27,610 @@ public interface ClusterConnectionTests { static final Point POINT_CATANIA = new Point(15.087269, 37.502669); static final Point POINT_PALERMO = new Point(13.361389, 38.115556); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void shouldAllowSettingAndGettingValues(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void delShouldRemoveSingleKeyCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void delShouldRemoveMultipleKeysCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void delShouldRemoveMultipleKeysOnSameSlotCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void typeShouldReadKeyTypeCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void keysShouldReturnAllKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void keysShouldReturnAllKeysForSpecificNode(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void randomKeyShouldReturnCorrectlyWhenKeysAvailable(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void randomKeyShouldReturnNullWhenNoKeysAvailable(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void rename(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void renameSameKeysOnSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void renameNXWhenTargetKeyDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void renameNXWhenTargetKeyDoesExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void renameNXWhenOnSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void expireShouldBeSetCorreclty(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pExpireShouldBeSetCorreclty(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void expireAtShouldBeSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pExpireAtShouldBeSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void persistShouldRemoveTTL(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void moveShouldNotBeSupported(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void dbSizeShouldReturnCummulatedDbSize(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void dbSizeForSpecificNodeShouldGetNodeDbSize(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void ttlShouldReturnMinusTwoWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-526 - */ + // DATAREDIS-526 void ttlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void ttlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void ttlShouldReturnValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pTtlShouldReturnMinusTwoWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-526 - */ + // DATAREDIS-526 void pTtlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pTtlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pTtlShouldReturValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sortShouldReturnValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sortAndStoreShouldAddSortedValuesValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sortAndStoreShouldReturnZeroWhenListDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void dumpAndRestoreShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getShouldReturnValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getSetShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mGetShouldReturnCorrectlyWhenKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mGetShouldReturnCorrectlyWhenKeysDoNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setNxShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setNxShouldNotSetValueWhenAlreadyExistsInDBCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setExShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pSetExShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mSetShouldWorkWhenKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mSetShouldWorkWhenKeysDoNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mSetNXShouldReturnTrueIfAllKeysSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mSetNXShouldReturnFalseIfNotAllKeysSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void mSetNXShouldWorkForOnSameSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void incrShouldIncreaseValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void incrByShouldIncreaseValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void incrByFloatShouldIncreaseValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void decrShouldDecreaseValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void decrByShouldDecreaseValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void appendShouldAddValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getRangeShouldReturnValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setRangeShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getBitShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void setBitShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void bitCountShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void bitCountWithRangeShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void bitOpShouldThrowExceptionWhenKeysDoNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void strLenShouldWorkCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void rPushShoultAddValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lPushShoultAddValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void rPushNXShoultNotAddValuesWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lPushNXShoultNotAddValuesWhenKeyDoesNotExist(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lLenShouldCountValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lRangeShouldGetValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lTrimShouldTrimListCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lIndexShouldGetElementAtIndexCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lInsertShouldAddElementAtPositionCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lSetShouldSetElementAtPositionCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lRemShouldRemoveElementAtPositionCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void lPopShouldReturnElementCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void rPopShouldReturnElementCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void blPopShouldPopElementCorectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void blPopShouldPopElementCorectlyWhenKeyOnSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void brPopShouldPopElementCorectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void brPopShouldPopElementCorectlyWhenKeyOnSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void rPopLPushShouldWorkWhenDoNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 public void rPopLPushShouldWorkWhenKeysOnSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void bRPopLPushShouldWork(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void bRPopLPushShouldWorkOnSameSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sAddShouldAddValueToSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sRemShouldRemoveValueFromSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sPopShouldPopValueFromSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sMoveShouldWorkWhenKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sMoveShouldWorkWhenKeysDoNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sCardShouldCountValuesInSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sIsMemberShouldReturnTrueIfValueIsMemberOfSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sIsMemberShouldReturnFalseIfValueIsMemberOfSet(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sInterShouldWorkForKeysMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sInterShouldWorkForKeysNotMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sInterStoreShouldWorkForKeysMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sInterStoreShouldWorkForKeysNotMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sUnionShouldWorkForKeysMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sUnionShouldWorkForKeysNotMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sUnionStoreShouldWorkForKeysMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sUnionStoreShouldWorkForKeysNotMappingToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sDiffShouldWorkWhenKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sDiffShouldWorkWhenKeysNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sDiffStoreShouldWorkWhenKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sDiffStoreShouldWorkWhenKeysNotMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sMembersShouldReturnValuesContainedInSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sRandMamberShouldReturnValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sRandMamberWithCountShouldReturnValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void sscanShouldRetrieveAllValuesInSetCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zAddShouldAddValueWithScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRemShouldRemoveValueWithScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zIncrByShouldIncScoreForValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRankShouldReturnPositionForValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRankShouldReturnReversePositionForValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeShouldReturnValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeWithScoresShouldReturnValuesAndScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeByScoreShouldReturnValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeShouldReturnValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeWithScoresShouldReturnValuesAndScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeByScoreShouldReturnValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRevRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zCountShouldCountValuesInRange(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zCardShouldReturnTotalNumberOfValues(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zScoreShouldRetrieveScoreForValue(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRemRangeShouldRemoveValues(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRemRangeByScoreShouldRemoveValues(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zUnionStoreShouldWorkForSameSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zUnionStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zInterStoreShouldWorkForSameSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zInterStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots(); - /** - * @see DATAREDIS-479 - */ + // DATAREDIS-479 void zScanShouldReadEntireValueRange(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hSetShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hSetNXShouldSetValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hSetNXShouldNotSetValueWhenAlreadyExists(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hGetShouldRetrieveValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hMGetShouldRetrieveValueCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hMSetShouldAddValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hIncrByShouldIncreaseFieldCorretly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hIncrByFloatShouldIncreaseFieldCorretly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hExistsShouldReturnPresenceOfFieldCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hDelShouldRemoveFieldsCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hLenShouldRetrieveSizeCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hKeysShouldRetrieveKeysCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hValsShouldRetrieveValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void hGetAllShouldRetrieveEntriesCorrectly(); - /** - * @see DATAREDIS-479 - */ + // DATAREDIS-479 public void hScanShouldReadEntireValueRange(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void multiShouldThrowException(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void execShouldThrowException(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void discardShouldThrowException(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void watchShouldThrowException(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void unwatchShouldThrowException(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void selectShouldAllowSelectionOfDBIndexZero(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void selectShouldThrowExceptionWhenSelectingNonZeroDbIndex(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void echoShouldReturnInputCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pingShouldRetrunPongForExistingNode(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pingShouldRetrunPong(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pingShouldThrowExceptionWhenNodeNotKnownToCluster(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void flushDbShouldFlushAllClusterNodes(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void flushDbOnSingleNodeShouldFlushOnlyGivenNodesDb(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void zRangeByLexShouldReturnResultCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void infoShouldCollectionInfoFromAllClusterNodes(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void clientListShouldGetInfosForAllClients(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getClusterNodeForKeyShouldReturnNodeCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void countKeysShouldReturnNumberOfKeysInSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pfAddShouldAddValuesCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pfCountShouldAllowCountingOnSingleKey(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pfCountShouldAllowCountingOnSameSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pfCountShouldThrowErrorCountingOnDifferentSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void pfMergeShouldWorkWhenAllKeysMapToSameSlot(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 public void pfMergeShouldThrowErrorOnDifferentSlotKeys(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void infoShouldCollectInfoForSpecificNode(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void infoShouldCollectInfoForSpecificNodeAndSection(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getConfigShouldLoadCumulatedConfiguration(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void getConfigShouldLoadConfigurationOfSpecificNode(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void clusterGetSlavesShouldReturnSlaveCorrectly(); - /** - * @see DATAREDIS-315 - */ + // DATAREDIS-315 void clusterGetMasterSlaveMapShouldListMastersAndSlavesCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationInSecondsShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationInMillisecondsShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithOptionIfPresentShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithOptionIfAbsentShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationAndIfAbsentShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationAndIfAbsentShouldNotBeAppliedWhenKeyExists(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationAndIfPresentShouldWorkCorrectly(); - /** - * @see DATAREDIS-316 - */ + // DATAREDIS-316 void setWithExpirationAndIfPresentShouldNotBeAppliedWhenKeyDoesNotExists(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoAddSingleGeoLocation(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoAddMultipleGeoLocations(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoDist(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoDistWithMetric(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoHash(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoHashNonExisting(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoPosition(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoPositionNonExisting(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusShouldReturnMembersCorrectly(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusShouldReturnDistanceCorrectly(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusShouldApplyLimit(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusByMemberShouldReturnMembersCorrectly(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusByMemberShouldReturnDistanceCorrectly(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRadiusByMemberShouldApplyLimit(); - /** - * @see DATAREDIS-438 - */ + // DATAREDIS-438 void geoRemoveDeletesMembers(); } diff --git a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTests.java b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTests.java index 92254be85..2e250da7e 100644 --- a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTests.java +++ b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTests.java @@ -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() { diff --git a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTxTests.java b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTxTests.java index ef61a56d5..728cd9b9f 100644 --- a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTxTests.java +++ b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionPipelineTxTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTests.java b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTests.java index 908f14f75..6b4378f26 100644 --- a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTests.java +++ b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTests.java @@ -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 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> values = Collections.singletonList(new GeoLocation(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); diff --git a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTxTests.java b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTxTests.java index 7eda5424a..84512fd4e 100644 --- a/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTxTests.java +++ b/src/test/java/org/springframework/data/redis/connection/DefaultStringRedisConnectionTxTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/connection/RedisClusterConfigurationUnitTests.java b/src/test/java/org/springframework/data/redis/connection/RedisClusterConfigurationUnitTests.java index 63b65b99f..695db800c 100644 --- a/src/test/java/org/springframework/data/redis/connection/RedisClusterConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/RedisClusterConfigurationUnitTests.java @@ -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(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. singleton(null)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void shouldNotFailWhenListOfHostAndPortIsEmpty() { RedisClusterConfiguration config = new RedisClusterConfiguration(Collections. 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(); diff --git a/src/test/java/org/springframework/data/redis/connection/RedisConnectionUnitTests.java b/src/test/java/org/springframework/data/redis/connection/RedisConnectionUnitTests.java index 66ee14ea3..1c4ed68b2 100644 --- a/src/test/java/org/springframework/data/redis/connection/RedisConnectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/RedisConnectionUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/connection/RedisSentinelConfigurationUnitTests.java b/src/test/java/org/springframework/data/redis/connection/RedisSentinelConfigurationUnitTests.java index c4e2ac0ff..1d0b282c6 100644 --- a/src/test/java/org/springframework/data/redis/connection/RedisSentinelConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/RedisSentinelConfigurationUnitTests.java @@ -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(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. singleton(null)); } - /** - * @see DATAREDIS-372 - */ - @Test + @Test // DATAREDIS-372 public void shouldNotFailWhenListOfHostAndPortIsEmpty() { RedisSentinelConfiguration config = new RedisSentinelConfiguration("mymaster", Collections. 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(); diff --git a/src/test/java/org/springframework/data/redis/connection/convert/ConvertersUnitTests.java b/src/test/java/org/springframework/data/redis/connection/convert/ConvertersUnitTests.java index 7c6f08f13..0ed11090d 100644 --- a/src/test/java/org/springframework/data/redis/connection/convert/ConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/convert/ConvertersUnitTests.java @@ -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 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 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 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 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 nodes = Converters.toSetOfRedisClusterNodes(CLUSTER_NODE_IMPORTING_SLOT).iterator(); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionTests.java index b57eb0a00..58212aed1 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionTests.java @@ -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. @@ -136,20 +136,14 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { nativeConnection.close(); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void shouldAllowSettingAndGettingValues() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES); assertThat(clusterConnection.get(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveSingleKeyCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -159,10 +153,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveMultipleKeysCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -174,10 +165,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveMultipleKeysOnSameSlotCorrectly() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -189,10 +177,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void typeShouldReadKeyTypeCorrectly() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES); @@ -204,10 +189,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.type(KEY_3_BYTES), is(DataType.HASH)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void keysShouldReturnAllKeys() { nativeConnection.set(KEY_1, VALUE_1); @@ -216,10 +198,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.keys(JedisConverters.toBytes("*")), hasItems(KEY_1_BYTES, KEY_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void keysShouldReturnAllKeysForSpecificNode() { nativeConnection.set(KEY_1, VALUE_1); @@ -232,10 +211,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(keysOnNode, not(hasItems(KEY_1_BYTES))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void randomKeyShouldReturnCorrectlyWhenKeysAvailable() { nativeConnection.set(KEY_1, VALUE_1); @@ -244,18 +220,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.randomKey(), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void randomKeyShouldReturnNullWhenNoKeysAvailable() { assertThat(clusterConnection.randomKey(), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rename() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -266,10 +236,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameSameKeysOnSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES); @@ -280,10 +247,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenTargetKeyDoesNotExist() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -294,10 +258,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenTargetKeyDoesExist() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -309,10 +270,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2_BYTES), is(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenOnSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES); @@ -323,10 +281,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void expireShouldBeSetCorreclty() { nativeConnection.set(KEY_1, VALUE_1); @@ -336,10 +291,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(JedisConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pExpireShouldBeSetCorreclty() { nativeConnection.set(KEY_1, VALUE_1); @@ -349,10 +301,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(JedisConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void expireAtShouldBeSetCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -362,10 +311,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(JedisConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pExpireAtShouldBeSetCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -375,10 +321,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(JedisConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void persistShouldRemoveTTL() { nativeConnection.setex(KEY_1_BYTES, 10, VALUE_1_BYTES); @@ -387,18 +330,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) // DATAREDIS-315 public void moveShouldNotBeSupported() { clusterConnection.move(KEY_1_BYTES, 3); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dbSizeShouldReturnCummulatedDbSize() { nativeConnection.set(KEY_1, VALUE_1); @@ -407,10 +344,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.dbSize(), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dbSizeForSpecificNodeShouldGetNodeDbSize() { nativeConnection.set(KEY_1, VALUE_1); @@ -421,26 +355,17 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.dbSize(new RedisClusterNode("127.0.0.1", 7381, null)), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.ttl(KEY_1_BYTES), is(-2L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void ttlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.ttl(KEY_1_BYTES, TimeUnit.HOURS), is(-2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet() { nativeConnection.set(KEY_1, VALUE_1); @@ -448,10 +373,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.ttl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -460,26 +382,17 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.ttl(KEY_1_BYTES) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.pTtl(KEY_1_BYTES), is(-2L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void pTtlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.pTtl(KEY_1_BYTES, TimeUnit.HOURS), is(-2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet() { nativeConnection.set(KEY_1, VALUE_1); @@ -487,10 +400,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pTtl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -499,10 +409,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pTtl(KEY_1_BYTES) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortShouldReturnValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_2, VALUE_1); @@ -511,10 +418,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortAndStoreShouldAddSortedValuesValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_2, VALUE_1); @@ -523,18 +427,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortAndStoreShouldReturnZeroWhenListDoesNotExist() { assertThat(clusterConnection.sort(KEY_1_BYTES, new DefaultSortParameters().alpha(), KEY_2_BYTES), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dumpAndRestoreShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -545,10 +443,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -556,10 +451,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.get(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getSetShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -570,10 +462,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mGetShouldReturnCorrectlyWhenKeysMapToSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES); @@ -583,10 +472,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { contains(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mGetShouldReturnCorrectlyWhenKeysDoNotMapToSameSlot() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -595,10 +481,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.mGet(KEY_1_BYTES, KEY_2_BYTES), contains(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setShouldSetValueCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -606,10 +489,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setNxShouldSetValueCorrectly() { clusterConnection.setNX(KEY_1_BYTES, VALUE_1_BYTES); @@ -617,10 +497,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setNxShouldNotSetValueWhenAlreadyExistsInDBCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -630,10 +507,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setExShouldSetValueCorrectly() { clusterConnection.setEx(KEY_1_BYTES, 5, VALUE_1_BYTES); @@ -642,10 +516,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pSetExShouldSetValueCorrectly() { clusterConnection.pSetEx(KEY_1_BYTES, 5000, VALUE_1_BYTES); @@ -654,10 +525,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetShouldWorkWhenKeysMapToSameSlot() { Map map = new LinkedHashMap(); @@ -670,10 +538,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetShouldWorkWhenKeysDoNotMapToSameSlot() { Map map = new LinkedHashMap(); @@ -686,10 +551,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldReturnTrueIfAllKeysSet() { Map map = new LinkedHashMap(); @@ -702,10 +564,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldReturnFalseIfNotAllKeysSet() { nativeConnection.set(KEY_2_BYTES, VALUE_3_BYTES); @@ -719,10 +578,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldWorkForOnSameSlotKeys() { Map map = new LinkedHashMap(); @@ -735,10 +591,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -746,10 +599,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incr(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrByShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -757,10 +607,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incrBy(KEY_1_BYTES, 5), is(6L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrByFloatShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -768,10 +615,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incrBy(KEY_1_BYTES, 5.5D), is(6.5D)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void decrShouldDecreaseValueCorrectly() { nativeConnection.set(KEY_1, "5"); @@ -779,10 +623,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.decr(KEY_1_BYTES), is(4L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void decrByShouldDecreaseValueCorrectly() { nativeConnection.set(KEY_1, "5"); @@ -790,10 +631,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.decrBy(KEY_1_BYTES, 4), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void appendShouldAddValueCorrectly() { clusterConnection.append(KEY_1_BYTES, VALUE_1_BYTES); @@ -802,10 +640,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1.concat(VALUE_2))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getRangeShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -813,10 +648,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.getRange(KEY_1_BYTES, 0, 2), is(JedisConverters.toBytes("val"))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setRangeShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -826,10 +658,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is("valUE1")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getBitShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, true); @@ -839,10 +668,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.getBit(KEY_1_BYTES, 1), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setBitShouldWorkCorrectly() { clusterConnection.setBit(KEY_1_BYTES, 0, true); @@ -852,10 +678,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.getbit(KEY_1, 1), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitCountShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, true); @@ -864,10 +687,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bitCount(KEY_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitCountWithRangeShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, true); @@ -879,10 +699,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bitCount(KEY_1_BYTES, 0, 3), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitOpShouldWorkCorrectly() { nativeConnection.set(SAME_SLOT_KEY_1, "foo"); @@ -893,18 +710,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_3), is("bab")); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void bitOpShouldThrowExceptionWhenKeysDoNotMapToSameSlot() { clusterConnection.bitOp(BitOperation.AND, KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void strLenShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -912,10 +723,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.strLen(KEY_1_BYTES), is(6L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPushShoultAddValuesCorrectly() { clusterConnection.rPush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -923,10 +731,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPushShoultAddValuesCorrectly() { clusterConnection.lPush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -934,10 +739,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPushNXShoultNotAddValuesWhenKeyDoesNotExist() { clusterConnection.rPushX(KEY_1_BYTES, VALUE_1_BYTES); @@ -945,10 +747,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPushNXShoultNotAddValuesWhenKeyDoesNotExist() { clusterConnection.lPushX(KEY_1_BYTES, VALUE_1_BYTES); @@ -956,10 +755,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lLenShouldCountValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -967,10 +763,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lLen(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lRangeShouldGetValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -978,10 +771,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lRange(KEY_1_BYTES, 0L, -1L), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lTrimShouldTrimListCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -991,10 +781,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lIndexShouldGetElementAtIndexCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1002,10 +789,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lIndex(KEY_1_BYTES, 1), is(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lInsertShouldAddElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1015,10 +799,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1).get(2), is("booh!")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lSetShouldSetElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1028,10 +809,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1).get(1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lRemShouldRemoveElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1041,10 +819,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.llen(KEY_1), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPopShouldReturnElementCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2); @@ -1052,10 +827,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lPop(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopShouldReturnElementCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2); @@ -1063,10 +835,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.rPop(KEY_1_BYTES), is(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void blPopShouldPopElementCorectly() { nativeConnection.lpush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1075,10 +844,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bLPop(100, KEY_1_BYTES, KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void blPopShouldPopElementCorectlyWhenKeyOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1087,10 +853,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bLPop(100, SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void brPopShouldPopElementCorectly() { nativeConnection.lpush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1099,10 +862,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bRPop(100, KEY_1_BYTES, KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void brPopShouldPopElementCorectlyWhenKeyOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1111,10 +871,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bRPop(100, SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopLPushShouldWorkWhenDoNotMapToSameSlot() { nativeConnection.lpush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1123,10 +880,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopLPushShouldWorkWhenKeysOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1135,10 +889,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(SAME_SLOT_KEY_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bRPopLPushShouldWork() { nativeConnection.lpush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1147,10 +898,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bRPopLPushShouldWorkOnSameSlotKeys() { nativeConnection.lpush(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1159,10 +907,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(SAME_SLOT_KEY_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sAddShouldAddValueToSetCorrectly() { clusterConnection.sAdd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1170,10 +915,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRemShouldRemoveValueFromSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1183,10 +925,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_1), hasItems(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sPopShouldPopValueFromSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1194,10 +933,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sPop(KEY_1_BYTES), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMoveShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1209,10 +945,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.sismember(SAME_SLOT_KEY_2_BYTES, VALUE_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMoveShouldWorkWhenKeysDoNotMapToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1224,10 +957,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.sismember(KEY_2_BYTES, VALUE_2_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sCardShouldCountValuesInSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1235,10 +965,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sCard(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sIsMemberShouldReturnTrueIfValueIsMemberOfSet() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1246,10 +973,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sIsMember(KEY_1_BYTES, VALUE_1_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sIsMemberShouldReturnFalseIfValueIsMemberOfSet() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1257,10 +981,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sIsMember(KEY_1_BYTES, JedisConverters.toBytes("foo")), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1269,10 +990,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sInter(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1281,10 +999,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sInter(KEY_1_BYTES, KEY_2_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterStoreShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1295,10 +1010,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterStoreShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1309,10 +1021,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1322,10 +1031,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1335,10 +1041,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionStoreShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1349,10 +1052,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionStoreShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1363,10 +1063,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1375,10 +1072,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sDiff(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffShouldWorkWhenKeysNotMapToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1387,10 +1081,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sDiff(KEY_1_BYTES, KEY_2_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffStoreShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1401,10 +1092,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffStoreShouldWorkWhenKeysNotMapToSameSlot() { nativeConnection.sadd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1415,10 +1103,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMembersShouldReturnValuesContainedInSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1426,10 +1111,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sMembers(KEY_1_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRandMamberShouldReturnValueCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1437,10 +1119,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sRandMember(KEY_1_BYTES), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRandMamberWithCountShouldReturnValueCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1448,10 +1127,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sRandMember(KEY_1_BYTES, 3), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sscanShouldRetrieveAllValuesInSetCorrectly() { for (int i = 0; i < 30; i++) { @@ -1468,10 +1144,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(count, is(30)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zAddShouldAddValueWithScoreCorrectly() { clusterConnection.zAdd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1480,10 +1153,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zcard(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemShouldRemoveValueWithScoreCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1494,10 +1164,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zcard(KEY_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zIncrByShouldIncScoreForValueCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1508,10 +1175,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrank(KEY_1_BYTES, VALUE_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRankShouldReturnPositionForValueCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1520,10 +1184,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRank(KEY_1_BYTES, VALUE_2_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRankShouldReturnReversePositionForValueCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1532,10 +1193,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRank(KEY_1_BYTES, VALUE_2_BYTES), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1545,10 +1203,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRange(KEY_1_BYTES, 1, 2), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1559,10 +1214,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D), (Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1572,10 +1224,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRangeByScore(KEY_1_BYTES, 10, 20), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1586,10 +1235,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D), (Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1599,10 +1245,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRangeByScore(KEY_1_BYTES, 10D, 20D, 0L, 1L), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1613,10 +1256,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1626,10 +1266,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRange(KEY_1_BYTES, 1, 2), hasItems(VALUE_3_BYTES, VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1640,10 +1277,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_3_BYTES, 5D), (Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1653,10 +1287,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRangeByScore(KEY_1_BYTES, 10D, 20D), hasItems(VALUE_2_BYTES, VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1667,10 +1298,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_2_BYTES, 20D), (Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1680,10 +1308,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRangeByScore(KEY_1_BYTES, 10D, 20D, 0L, 1L), hasItems(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1694,10 +1319,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zCountShouldCountValuesInRange() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1707,10 +1329,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zCount(KEY_1_BYTES, 10, 20), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zCardShouldReturnTotalNumberOfValues() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1720,10 +1339,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zCard(KEY_1_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zScoreShouldRetrieveScoreForValue() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1732,10 +1348,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zScore(KEY_1_BYTES, VALUE_2_BYTES), is(20D)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemRangeShouldRemoveValues() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1748,10 +1361,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(KEY_1_BYTES, 0, -1), hasItem(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemRangeByScoreShouldRemoveValues() { nativeConnection.zadd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1764,10 +1374,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(KEY_1_BYTES, 0, -1), hasItems(VALUE_1_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zUnionStoreShouldWorkForSameSlotKeys() { nativeConnection.zadd(SAME_SLOT_KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1780,18 +1387,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void zUnionStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots() { clusterConnection.zUnionStore(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zInterStoreShouldWorkForSameSlotKeys() { nativeConnection.zadd(SAME_SLOT_KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1805,18 +1406,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(SAME_SLOT_KEY_3_BYTES, 0, -1), hasItems(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void zInterStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots() { clusterConnection.zInterStore(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-479 - */ - @Test + @Test // DATAREDIS-479 public void zScanShouldReadEntireValueRange() { int nrOfValues = 321; @@ -1836,10 +1431,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(count, equalTo(nrOfValues)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetShouldSetValueCorrectly() { clusterConnection.hSet(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1847,10 +1439,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1_BYTES, KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetNXShouldSetValueCorrectly() { clusterConnection.hSetNX(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1858,10 +1447,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1_BYTES, KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetNXShouldNotSetValueWhenAlreadyExists() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1871,10 +1457,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1_BYTES, KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hGetShouldRetrieveValueCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1882,10 +1465,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hGet(KEY_1_BYTES, KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hMGetShouldRetrieveValueCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1894,10 +1474,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hMGet(KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hMSetShouldAddValuesCorrectly() { Map hashes = new HashMap(); @@ -1909,10 +1486,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hmget(KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hIncrByShouldIncreaseFieldCorretly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, JedisConverters.toBytes(1L)); @@ -1923,10 +1497,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1_BYTES, KEY_3_BYTES), is(JedisConverters.toBytes(5L))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hIncrByFloatShouldIncreaseFieldCorretly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, JedisConverters.toBytes(1L)); @@ -1937,10 +1508,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1_BYTES, KEY_3_BYTES), is(JedisConverters.toBytes(5.5D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hExistsShouldReturnPresenceOfFieldCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1950,10 +1518,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hExists(JedisConverters.toBytes("foo"), KEY_2_BYTES), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hDelShouldRemoveFieldsCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1965,10 +1530,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hexists(KEY_1_BYTES, KEY_3_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hLenShouldRetrieveSizeCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1977,10 +1539,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hLen(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hKeysShouldRetrieveKeysCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1989,10 +1548,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hKeys(KEY_1_BYTES), hasItems(KEY_2_BYTES, KEY_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hValsShouldRetrieveValuesCorrectly() { nativeConnection.hset(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -2001,10 +1557,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hVals(KEY_1_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hGetAllShouldRetrieveEntriesCorrectly() { Map hashes = new HashMap(); @@ -2019,10 +1572,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(hGetAll.containsKey(KEY_3_BYTES), is(true)); } - /** - * @see DATAREDIS-479 - */ - @Test + @Test // DATAREDIS-479 public void hScanShouldReadEntireValueRange() { int nrOfValues = 321; @@ -2043,98 +1593,62 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(i, is(nrOfValues)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void multiShouldThrowException() { clusterConnection.multi(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void execShouldThrowException() { clusterConnection.exec(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void discardShouldThrowException() { clusterConnection.discard(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void watchShouldThrowException() { clusterConnection.watch(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void unwatchShouldThrowException() { clusterConnection.unwatch(); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void selectShouldAllowSelectionOfDBIndexZero() { clusterConnection.select(0); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void selectShouldThrowExceptionWhenSelectingNonZeroDbIndex() { clusterConnection.select(1); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void echoShouldReturnInputCorrectly() { assertThat(clusterConnection.echo(VALUE_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pingShouldRetrunPongForExistingNode() { assertThat(clusterConnection.ping(new RedisClusterNode("127.0.0.1", 7379, null)), is("PONG")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pingShouldRetrunPong() { assertThat(clusterConnection.ping(), is("PONG")); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAREDIS-315 public void pingShouldThrowExceptionWhenNodeNotKnownToCluster() { clusterConnection.ping(new RedisClusterNode("127.0.0.1", 1234, null)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void flushDbShouldFlushAllClusterNodes() { nativeConnection.set(KEY_1, VALUE_1); @@ -2146,10 +1660,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void flushDbOnSingleNodeShouldFlushOnlyGivenNodesDb() { nativeConnection.set(KEY_1, VALUE_1); @@ -2161,10 +1672,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByLexShouldReturnResultCorrectly() { nativeConnection.zadd(KEY_1, 0, "a"); @@ -2198,34 +1706,22 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { JedisConverters.toBytes("c"), JedisConverters.toBytes("d")))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectionInfoFromAllClusterNodes() { assertThat(Double.valueOf(clusterConnection.info().size()), closeTo(245d, 35d)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clientListShouldGetInfosForAllClients() { assertThat(clusterConnection.getClientList().isEmpty(), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getClusterNodeForKeyShouldReturnNodeCorrectly() { assertThat((RedisNode) clusterConnection.clusterGetNodeForKey(KEY_1_BYTES), is(new RedisNode("127.0.0.1", 7380))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void countKeysShouldReturnNumberOfKeysInSlot() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -2234,10 +1730,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.clusterCountKeysInSlot(ClusterSlotHashUtil.calculateSlot(SAME_SLOT_KEY_1)), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfAddShouldAddValuesCorrectly() { clusterConnection.pfAdd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES); @@ -2245,10 +1738,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.pfcount(KEY_1_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfCountShouldAllowCountingOnSingleKey() { nativeConnection.pfadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -2256,10 +1746,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pfCount(KEY_1_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfCountShouldAllowCountingOnSameSlotKeys() { nativeConnection.pfadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -2268,10 +1755,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pfCount(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void pfCountShouldThrowErrorCountingOnDifferentSlotKeys() { nativeConnection.pfadd(KEY_1, VALUE_1, VALUE_2); @@ -2280,10 +1764,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { clusterConnection.pfCount(KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfMergeShouldWorkWhenAllKeysMapToSameSlot() { nativeConnection.pfadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -2294,18 +1775,12 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.pfcount(SAME_SLOT_KEY_3), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void pfMergeShouldThrowErrorOnDifferentSlotKeys() { clusterConnection.pfMerge(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectInfoForSpecificNode() { Properties properties = clusterConnection.info(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT)); @@ -2313,10 +1788,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(properties.getProperty("tcp_port"), is(Integer.toString(MASTER_NODE_2_PORT))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectInfoForSpecificNodeAndSection() { Properties properties = clusterConnection.info(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT), "server"); @@ -2325,10 +1797,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(properties.getProperty("used_memory"), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getConfigShouldLoadCumulatedConfiguration() { List result = clusterConnection.getConfig("*max-*-entries*"); @@ -2346,10 +1815,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { } } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getConfigShouldLoadConfigurationOfSpecificNode() { List result = clusterConnection.getConfig(new RedisClusterNode(CLUSTER_HOST, SLAVEOF_NODE_1_PORT), "*"); @@ -2369,10 +1835,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.get(valueIndex), endsWith("7379")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clusterGetSlavesShouldReturnSlaveCorrectly() { Set slaves = clusterConnection @@ -2382,10 +1845,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(slaves, hasItem(new RedisClusterNode(CLUSTER_HOST, SLAVEOF_NODE_1_PORT))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clusterGetMasterSlaveMapShouldListMastersAndSlavesCorrectly() { Map> masterSlaveMap = clusterConnection.clusterGetMasterSlaveMap(); @@ -2398,10 +1858,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(masterSlaveMap.get(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_3_PORT)).isEmpty(), is(true)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationInSecondsShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.upsert()); @@ -2410,10 +1867,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationInMillisecondsShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.milliseconds(500), SetOption.upsert()); @@ -2422,20 +1876,14 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.pttl(KEY_1).doubleValue(), is(closeTo(500d, 499d))); } - /** - * @see DATAREDIS-316 - */ - @Test(expected = UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) // DATAREDIS-316 public void setWithOptionIfPresentShouldWorkCorrectly() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); clusterConnection.set(KEY_1_BYTES, VALUE_2_BYTES, Expiration.persistent(), SetOption.ifPresent()); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithOptionIfAbsentShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.persistent(), SetOption.ifAbsent()); @@ -2444,10 +1892,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfAbsentShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.ifAbsent()); @@ -2456,10 +1901,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfAbsentShouldNotBeAppliedWhenKeyExists() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -2471,10 +1913,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1_BYTES), is(equalTo(VALUE_1_BYTES))); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfPresentShouldWorkCorrectly() { nativeConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -2486,10 +1925,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1_BYTES), is(equalTo(VALUE_2_BYTES))); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfPresentShouldNotBeAppliedWhenKeyDoesNotExists() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.ifPresent()); @@ -2497,28 +1933,19 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1_BYTES), is(false)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoAddSingleGeoLocation() { assertThat(clusterConnection.geoAdd(KEY_1_BYTES, PALERMO), is(1L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoAddMultipleGeoLocations() { assertThat(clusterConnection.geoAdd(KEY_1_BYTES, Arrays.asList(PALERMO, ARIGENTO, CATANIA, PALERMO)), is(3L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoDist() { @@ -2531,10 +1958,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(distance.getUnit(), is("m")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoDistWithMetric() { @@ -2548,10 +1972,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoHash() { @@ -2562,10 +1983,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result, contains("sqc8b49rny0", "sqdtr74hyu0")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoHashNonExisting() { @@ -2577,10 +1995,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result, contains("sqc8b49rny0", (String) null, "sqdtr74hyu0")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoPosition() { @@ -2596,10 +2011,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(positions.get(1).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoPositionNonExisting() { @@ -2618,10 +2030,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(positions.get(2).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldReturnMembersCorrectly() { @@ -2634,10 +2043,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldReturnDistanceCorrectly() { @@ -2653,10 +2059,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldApplyLimit() { @@ -2670,10 +2073,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldReturnMembersCorrectly() { @@ -2688,10 +2088,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(1).getContent().getName(), is(ARIGENTO.getName())); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldReturnDistanceCorrectly() { @@ -2707,10 +2104,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldApplyLimit() { @@ -2724,10 +2118,7 @@ public class JedisClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRemoveDeletesMembers() { diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionUnitTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionUnitTests.java index f80cf578d..9a0e8f8bf 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionUnitTests.java @@ -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 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); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryTests.java index 9bba1f8fe..ece335c32 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryTests.java @@ -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")); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryUnitTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryUnitTests.java index 60b538593..94cc20394 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactoryUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionIntegrationTests.java index 468680fd0..cdaac01b6 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionIntegrationTests.java @@ -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"); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineIntegrationTests.java index cc3b99c27..e55f5470d 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineIntegrationTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineTxIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineTxIntegrationTests.java index d6c582bc7..a050a4e75 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineTxIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionPipelineTxIntegrationTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionTransactionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionTransactionIntegrationTests.java index dfb4ab14b..60943daec 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionTransactionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionTransactionIntegrationTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionUnitTestSuite.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionUnitTestSuite.java index 150954be7..ad0c20d3c 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionUnitTestSuite.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConnectionUnitTestSuite.java @@ -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("0", Collections. 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("0", Collections. 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("0", Collections. 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("0", Collections. 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("0", Collections. 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("0", Collections. 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("0", Collections. 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("0", Collections. 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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConvertersUnitTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConvertersUnitTests.java index 1f4a68f66..b618ef62b 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisConvertersUnitTests.java @@ -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. emptyList())); } - /** - * @see DATAREDIS-268 - */ - @Test + @Test // DATAREDIS-268 public void convertingNullToListOfRedisClientInfoShouldReturnEmptyList() { assertThat(JedisConverters.toListOfRedisClientInformation(null), equalTo(Collections. 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 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> 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.> 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[] {})); } diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisExceptionConverterUnitTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisExceptionConverterUnitTests.java index 1a47d6617..5414830c2 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisExceptionConverterUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisExceptionConverterUnitTests.java @@ -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 diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelConnectionUnitTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelConnectionUnitTests.java index c34530cfd..e438459f9 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelConnectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelConnectionUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelIntegrationTests.java index 278459766..5fe7142e5 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisSentinelIntegrationTests.java @@ -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 servers = (List) 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(); diff --git a/src/test/java/org/springframework/data/redis/connection/jedis/JedisTransactionalConnectionStarvationTest.java b/src/test/java/org/springframework/data/redis/connection/jedis/JedisTransactionalConnectionStarvationTest.java index 874fb0118..ed668ffc2 100644 --- a/src/test/java/org/springframework/data/redis/connection/jedis/JedisTransactionalConnectionStarvationTest.java +++ b/src/test/java/org/springframework/data/redis/connection/jedis/JedisTransactionalConnectionStarvationTest.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/DefaultLettucePoolTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/DefaultLettucePoolTests.java index d301bbfee..77b32c454 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/DefaultLettucePoolTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/DefaultLettucePoolTests.java @@ -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()); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionTests.java index 7c75002a0..1ade5054f 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionTests.java @@ -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. @@ -133,20 +133,14 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { client.shutdown(0, 0, TimeUnit.MILLISECONDS); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void shouldAllowSettingAndGettingValues() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES); assertThat(clusterConnection.get(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveSingleKeyCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -156,10 +150,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveMultipleKeysCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -172,10 +163,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void delShouldRemoveMultipleKeysOnSameSlotCorrectly() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -187,10 +175,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void typeShouldReadKeyTypeCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1); @@ -202,10 +187,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.type(KEY_3_BYTES), is(DataType.HASH)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void keysShouldReturnAllKeys() { nativeConnection.set(KEY_1, VALUE_1); @@ -214,10 +196,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.keys(LettuceConverters.toBytes("*")), hasItems(KEY_1_BYTES, KEY_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void keysShouldReturnAllKeysForSpecificNode() { nativeConnection.set(KEY_1, VALUE_1); @@ -230,10 +209,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(keysOnNode, not(hasItems(KEY_1_BYTES))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void randomKeyShouldReturnCorrectlyWhenKeysAvailable() { nativeConnection.set(KEY_1, VALUE_1); @@ -242,18 +218,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.randomKey(), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void randomKeyShouldReturnNullWhenNoKeysAvailable() { assertThat(clusterConnection.randomKey(), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rename() { nativeConnection.set(KEY_1, VALUE_1); @@ -264,10 +234,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameSameKeysOnSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -278,10 +245,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenTargetKeyDoesNotExist() { nativeConnection.set(KEY_1, VALUE_1); @@ -292,10 +256,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenTargetKeyDoesExist() { nativeConnection.set(KEY_1, VALUE_1); @@ -307,10 +268,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void renameNXWhenOnSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -321,10 +279,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void expireShouldBeSetCorreclty() { nativeConnection.set(KEY_1, VALUE_1); @@ -334,10 +289,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(LettuceConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pExpireShouldBeSetCorreclty() { nativeConnection.set(KEY_1, VALUE_1); @@ -347,10 +299,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(LettuceConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void expireAtShouldBeSetCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -360,10 +309,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(LettuceConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pExpireAtShouldBeSetCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -373,10 +319,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(LettuceConverters.toString(KEY_1_BYTES)) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void persistShouldRemoveTTL() { nativeConnection.setex(KEY_1, 10, VALUE_1); @@ -385,18 +328,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) // DATAREDIS-315 public void moveShouldNotBeSupported() { clusterConnection.move(KEY_1_BYTES, 3); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dbSizeShouldReturnCummulatedDbSize() { nativeConnection.set(KEY_1, VALUE_1); @@ -405,10 +342,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.dbSize(), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dbSizeForSpecificNodeShouldGetNodeDbSize() { nativeConnection.set(KEY_1, VALUE_1); @@ -419,26 +353,17 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.dbSize(new RedisClusterNode("127.0.0.1", 7381, null)), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.ttl(KEY_1_BYTES), is(-2L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void ttlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.ttl(KEY_1_BYTES, TimeUnit.HOURS), is(-2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet() { nativeConnection.set(KEY_1, VALUE_1); @@ -446,10 +371,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.ttl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void ttlWithTimeUnitShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet() { nativeConnection.set(KEY_1, VALUE_1); @@ -457,10 +379,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.ttl(KEY_1_BYTES, TimeUnit.SECONDS), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void ttlShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -469,26 +388,17 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.ttl(KEY_1_BYTES) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.pTtl(KEY_1_BYTES), is(-2L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void pTtlWithTimeUnitShouldReturnMinusTwoWhenKeyDoesNotExist() { assertThat(clusterConnection.pTtl(KEY_1_BYTES, TimeUnit.SECONDS), is(-2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturnMinusOneWhenKeyDoesNotHaveExpirationSet() { nativeConnection.set(KEY_1, VALUE_1); @@ -496,10 +406,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pTtl(KEY_1_BYTES), is(-1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pTtlShouldReturValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -508,10 +415,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pTtl(KEY_1_BYTES) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortShouldReturnValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_2, VALUE_1); @@ -520,10 +424,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortAndStoreShouldAddSortedValuesValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_2, VALUE_1); @@ -532,18 +433,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_2), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sortAndStoreShouldReturnZeroWhenListDoesNotExist() { assertThat(clusterConnection.sort(KEY_1_BYTES, new DefaultSortParameters().alpha(), KEY_2_BYTES), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void dumpAndRestoreShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -554,10 +449,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -565,10 +457,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.get(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getSetShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -579,10 +468,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mGetShouldReturnCorrectlyWhenKeysMapToSameSlot() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -592,10 +478,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { contains(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mGetShouldReturnCorrectlyWhenKeysDoNotMapToSameSlot() { nativeConnection.set(KEY_1, VALUE_1); @@ -604,10 +487,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.mGet(KEY_1_BYTES, KEY_2_BYTES), contains(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setShouldSetValueCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES); @@ -615,10 +495,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setNxShouldSetValueCorrectly() { clusterConnection.setNX(KEY_1_BYTES, VALUE_1_BYTES); @@ -626,10 +503,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setNxShouldNotSetValueWhenAlreadyExistsInDBCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -639,10 +513,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setExShouldSetValueCorrectly() { clusterConnection.setEx(KEY_1_BYTES, 5, VALUE_1_BYTES); @@ -651,10 +522,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pSetExShouldSetValueCorrectly() { clusterConnection.pSetEx(KEY_1_BYTES, 5000, VALUE_1_BYTES); @@ -663,10 +531,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetShouldWorkWhenKeysMapToSameSlot() { Map map = new LinkedHashMap(); @@ -679,10 +544,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetShouldWorkWhenKeysDoNotMapToSameSlot() { Map map = new LinkedHashMap(); @@ -695,10 +557,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldReturnTrueIfAllKeysSet() { Map map = new LinkedHashMap(); @@ -711,10 +570,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldReturnFalseIfNotAllKeysSet() { nativeConnection.set(KEY_2, VALUE_3); @@ -728,10 +584,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), is(VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void mSetNXShouldWorkForOnSameSlotKeys() { Map map = new LinkedHashMap(); @@ -744,10 +597,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_2), is(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -755,10 +605,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incr(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrByFloatShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -766,10 +613,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incrBy(KEY_1_BYTES, 5.5D), is(6.5D)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void incrByShouldIncreaseValueCorrectly() { nativeConnection.set(KEY_1, "1"); @@ -777,10 +621,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.incrBy(KEY_1_BYTES, 5), is(6L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void decrShouldDecreaseValueCorrectly() { nativeConnection.set(KEY_1, "5"); @@ -788,10 +629,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.decr(KEY_1_BYTES), is(4L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void decrByShouldDecreaseValueCorrectly() { nativeConnection.set(KEY_1, "5"); @@ -799,10 +637,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.decrBy(KEY_1_BYTES, 4), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void appendShouldAddValueCorrectly() { clusterConnection.append(KEY_1_BYTES, VALUE_1_BYTES); @@ -811,10 +646,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is(VALUE_1.concat(VALUE_2))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getRangeShouldReturnValueCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -822,10 +654,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.getRange(KEY_1_BYTES, 0, 2), is(LettuceConverters.toBytes("val"))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setRangeShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -835,10 +664,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_1), is("valUE1")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getBitShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, 1); @@ -848,10 +674,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.getBit(KEY_1_BYTES, 1), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void setBitShouldWorkCorrectly() { clusterConnection.setBit(KEY_1_BYTES, 0, true); @@ -861,10 +684,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.getbit(KEY_1, 1), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitCountShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, 1); @@ -873,10 +693,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bitCount(KEY_1_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitCountWithRangeShouldWorkCorrectly() { nativeConnection.setbit(KEY_1, 0, 1); @@ -888,10 +705,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bitCount(KEY_1_BYTES, 0, 3), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bitOpShouldWorkCorrectly() { nativeConnection.set(SAME_SLOT_KEY_1, "foo"); @@ -902,18 +716,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(SAME_SLOT_KEY_3), is("bab")); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void bitOpShouldThrowExceptionWhenKeysDoNotMapToSameSlot() { clusterConnection.bitOp(BitOperation.AND, KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void strLenShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -921,10 +729,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.strLen(KEY_1_BYTES), is(6L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPushShoultAddValuesCorrectly() { clusterConnection.rPush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -932,10 +737,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPushShoultAddValuesCorrectly() { clusterConnection.lPush(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -943,10 +745,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPushNXShoultNotAddValuesWhenKeyDoesNotExist() { clusterConnection.rPushX(KEY_1_BYTES, VALUE_1_BYTES); @@ -954,10 +753,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPushNXShoultNotAddValuesWhenKeyDoesNotExist() { clusterConnection.lPushX(KEY_1_BYTES, VALUE_1_BYTES); @@ -965,10 +761,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lLenShouldCountValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -976,10 +769,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lLen(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lRangeShouldGetValuesCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -987,10 +777,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lRange(KEY_1_BYTES, 0L, -1L), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lTrimShouldTrimListCorrectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1000,10 +787,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lIndexShouldGetElementAtIndexCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1011,10 +795,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lIndex(KEY_1_BYTES, 1), is(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lInsertShouldAddElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1024,10 +805,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1).get(2), is("booh!")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lSetShouldSetElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1037,10 +815,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.lrange(KEY_1, 0, -1).get(1), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lRemShouldRemoveElementAtPositionCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2, "foo", "bar"); @@ -1050,10 +825,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.llen(KEY_1), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void lPopShouldReturnElementCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2); @@ -1061,10 +833,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.lPop(KEY_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopShouldReturnElementCorrectly() { nativeConnection.rpush(KEY_1, VALUE_1, VALUE_2); @@ -1072,10 +841,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.rPop(KEY_1_BYTES), is(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void blPopShouldPopElementCorectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -1084,10 +850,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bLPop(100, KEY_1_BYTES, KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void blPopShouldPopElementCorectlyWhenKeyOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1096,10 +859,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bLPop(100, SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void brPopShouldPopElementCorectly() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -1108,10 +868,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bRPop(100, KEY_1_BYTES, KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void brPopShouldPopElementCorectlyWhenKeyOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1120,10 +877,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bRPop(100, SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopLPushShouldWorkWhenDoNotMapToSameSlot() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -1132,10 +886,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.bLPop(100, KEY_1_BYTES, KEY_2_BYTES).size(), is(2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bRPopLPushShouldWork() { nativeConnection.lpush(KEY_1, VALUE_1, VALUE_2); @@ -1144,10 +895,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_2), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void bRPopLPushShouldWorkOnSameSlotKeys() { nativeConnection.lpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1156,10 +904,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(SAME_SLOT_KEY_2), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void rPopLPushShouldWorkWhenKeysOnSameSlot() { nativeConnection.lpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1168,10 +913,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(SAME_SLOT_KEY_2), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sAddShouldAddValueToSetCorrectly() { clusterConnection.sAdd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES); @@ -1179,10 +921,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_1), hasItems(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRemShouldRemoveValueFromSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1192,10 +931,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_1), hasItems(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sPopShouldPopValueFromSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1203,10 +939,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sPop(KEY_1_BYTES), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMoveShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1218,10 +951,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.sismember(SAME_SLOT_KEY_2, VALUE_2), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMoveShouldWorkWhenKeysDoNotMapToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1233,10 +963,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.sismember(KEY_2, VALUE_2), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sCardShouldCountValuesInSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1244,10 +971,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sCard(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sIsMemberShouldReturnTrueIfValueIsMemberOfSet() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1255,10 +979,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sIsMember(KEY_1_BYTES, VALUE_1_BYTES), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sIsMemberShouldReturnFalseIfValueIsMemberOfSet() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1266,10 +987,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sIsMember(KEY_1_BYTES, LettuceConverters.toBytes("foo")), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1278,10 +996,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sInter(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1290,10 +1005,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sInter(KEY_1_BYTES, KEY_2_BYTES), hasItem(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterStoreShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1304,10 +1016,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3), hasItem(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sInterStoreShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1318,10 +1027,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3), hasItem(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1331,10 +1037,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1344,10 +1047,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems(VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionStoreShouldWorkForKeysMappingToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1358,10 +1058,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3), hasItems(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sUnionStoreShouldWorkForKeysNotMappingToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1372,10 +1069,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3), hasItems(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1384,10 +1078,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sDiff(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffShouldWorkWhenKeysNotMapToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1396,10 +1087,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sDiff(KEY_1_BYTES, KEY_2_BYTES), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffStoreShouldWorkWhenKeysMapToSameSlot() { nativeConnection.sadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -1410,10 +1098,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(SAME_SLOT_KEY_3), hasItems(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sDiffStoreShouldWorkWhenKeysNotMapToSameSlot() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1424,10 +1109,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.smembers(KEY_3), hasItems(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sMembersShouldReturnValuesContainedInSetCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1435,10 +1117,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sMembers(KEY_1_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRandMamberShouldReturnValueCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1446,10 +1125,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sRandMember(KEY_1_BYTES), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sRandMamberWithCountShouldReturnValueCorrectly() { nativeConnection.sadd(KEY_1, VALUE_1, VALUE_2); @@ -1457,10 +1133,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.sRandMember(KEY_1_BYTES, 3), notNullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void sscanShouldRetrieveAllValuesInSetCorrectly() { for (int i = 0; i < 30; i++) { @@ -1477,10 +1150,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(count, is(30)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zAddShouldAddValueWithScoreCorrectly() { clusterConnection.zAdd(KEY_1_BYTES, 10D, VALUE_1_BYTES); @@ -1489,10 +1159,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zcard(KEY_1), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemShouldRemoveValueWithScoreCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1503,10 +1170,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zcard(KEY_1), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zIncrByShouldIncScoreForValueCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1517,10 +1181,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrank(KEY_1, VALUE_1), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRankShouldReturnPositionForValueCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1529,10 +1190,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRank(KEY_1_BYTES, VALUE_2_BYTES), is(1L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRankShouldReturnReversePositionForValueCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1541,10 +1199,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRank(KEY_1_BYTES, VALUE_2_BYTES), is(0L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1554,10 +1209,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRange(KEY_1_BYTES, 1, 2), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1568,10 +1220,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D), (Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1581,10 +1230,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRangeByScore(KEY_1_BYTES, 10, 20), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1595,10 +1241,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D), (Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1608,10 +1251,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRangeByScore(KEY_1_BYTES, 10D, 20D, 0L, 1L), hasItems(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1622,10 +1262,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1635,10 +1272,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRange(KEY_1_BYTES, 1, 2), hasItems(VALUE_3_BYTES, VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1649,10 +1283,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_3_BYTES, 5D), (Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreShouldReturnValuesCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1662,10 +1293,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRangeByScore(KEY_1_BYTES, 10D, 20D), hasItems(VALUE_2_BYTES, VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreWithScoresShouldReturnValuesAndScoreCorrectly() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1676,10 +1304,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_2_BYTES, 20D), (Tuple) new DefaultTuple(VALUE_1_BYTES, 10D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1689,10 +1314,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zRevRangeByScore(KEY_1_BYTES, 10D, 20D, 0L, 1L), hasItems(VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRevRangeByScoreWithScoresShouldReturnValuesCorrectlyWhenGivenOffsetAndScore() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1703,10 +1325,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { hasItems((Tuple) new DefaultTuple(VALUE_2_BYTES, 20D))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zCountShouldCountValuesInRange() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1716,10 +1335,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zCount(KEY_1_BYTES, 10, 20), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zCardShouldReturnTotalNumberOfValues() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1729,10 +1345,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zCard(KEY_1_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zScoreShouldRetrieveScoreForValue() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1741,10 +1354,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.zScore(KEY_1_BYTES, VALUE_2_BYTES), is(20D)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemRangeShouldRemoveValues() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1757,10 +1367,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(KEY_1, 0, -1), hasItem(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRemRangeByScoreShouldRemoveValues() { nativeConnection.zadd(KEY_1, 10D, VALUE_1); @@ -1773,10 +1380,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(KEY_1, 0, -1), hasItems(VALUE_1, VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zUnionStoreShouldWorkForSameSlotKeys() { nativeConnection.zadd(SAME_SLOT_KEY_1, 10D, VALUE_1); @@ -1788,18 +1392,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(SAME_SLOT_KEY_3, 0, -1), hasItems(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void zUnionStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots() { clusterConnection.zUnionStore(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zInterStoreShouldWorkForSameSlotKeys() { nativeConnection.zadd(SAME_SLOT_KEY_1, 10D, VALUE_1); @@ -1813,10 +1411,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.zrange(SAME_SLOT_KEY_3, 0, -1), hasItems(VALUE_2)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void zInterStoreShouldThrowExceptionWhenKeysDoNotMapToSameSlots() { clusterConnection.zInterStore(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } @@ -1841,10 +1436,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(count, equalTo(nrOfValues)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetShouldSetValueCorrectly() { clusterConnection.hSet(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1852,10 +1444,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1, KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetNXShouldSetValueCorrectly() { clusterConnection.hSetNX(KEY_1_BYTES, KEY_2_BYTES, VALUE_1_BYTES); @@ -1863,10 +1452,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1, KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hSetNXShouldNotSetValueWhenAlreadyExists() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1876,10 +1462,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1, KEY_2), is(VALUE_1)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hGetShouldRetrieveValueCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1887,10 +1470,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hGet(KEY_1_BYTES, KEY_2_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hMGetShouldRetrieveValueCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1899,10 +1479,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hMGet(KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hMSetShouldAddValuesCorrectly() { Map hashes = new HashMap(); @@ -1914,10 +1491,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hMGet(KEY_1_BYTES, KEY_2_BYTES, KEY_3_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hIncrByShouldIncreaseFieldCorretly() { nativeConnection.hset(KEY_1, KEY_2, "1"); @@ -1928,10 +1502,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1, KEY_3), is("5")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hIncrByFloatShouldIncreaseFieldCorretly() { nativeConnection.hset(KEY_1, KEY_2, "1"); @@ -1942,10 +1513,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hget(KEY_1, KEY_3), is("5.5")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hExistsShouldReturnPresenceOfFieldCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1955,10 +1523,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hExists(LettuceConverters.toBytes("foo"), KEY_2_BYTES), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hDelShouldRemoveFieldsCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1970,10 +1535,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.hexists(KEY_1, KEY_3), is(true)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hLenShouldRetrieveSizeCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1982,10 +1544,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hLen(KEY_1_BYTES), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hKeysShouldRetrieveKeysCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -1994,10 +1553,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hKeys(KEY_1_BYTES), hasItems(KEY_2_BYTES, KEY_3_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hValsShouldRetrieveValuesCorrectly() { nativeConnection.hset(KEY_1, KEY_2, VALUE_1); @@ -2006,10 +1562,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.hVals(KEY_1_BYTES), hasItems(VALUE_1_BYTES, VALUE_2_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void hGetAllShouldRetrieveEntriesCorrectly() { Map hashes = new HashMap(); @@ -2044,98 +1597,62 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(i, is(nrOfValues)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void multiShouldThrowException() { clusterConnection.multi(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void execShouldThrowException() { clusterConnection.exec(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void discardShouldThrowException() { clusterConnection.discard(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void watchShouldThrowException() { clusterConnection.watch(); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void unwatchShouldThrowException() { clusterConnection.unwatch(); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void selectShouldAllowSelectionOfDBIndexZero() { clusterConnection.select(0); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void selectShouldThrowExceptionWhenSelectingNonZeroDbIndex() { clusterConnection.select(1); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void echoShouldReturnInputCorrectly() { assertThat(clusterConnection.echo(VALUE_1_BYTES), is(VALUE_1_BYTES)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pingShouldRetrunPongForExistingNode() { assertThat(clusterConnection.ping(new RedisClusterNode("127.0.0.1", 7379, null)), is("PONG")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pingShouldRetrunPong() { assertThat(clusterConnection.ping(), is("PONG")); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAREDIS-315 public void pingShouldThrowExceptionWhenNodeNotKnownToCluster() { clusterConnection.ping(new RedisClusterNode("127.0.0.1", 1234, null)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void flushDbShouldFlushAllClusterNodes() { nativeConnection.set(KEY_1, VALUE_1); @@ -2147,10 +1664,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void flushDbOnSingleNodeShouldFlushOnlyGivenNodesDb() { nativeConnection.set(KEY_1, VALUE_1); @@ -2162,10 +1676,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.get(KEY_2), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void zRangeByLexShouldReturnResultCorrectly() { nativeConnection.zadd(KEY_1, 0, "a"); @@ -2199,34 +1710,22 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { LettuceConverters.toBytes("c"), LettuceConverters.toBytes("d")))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectionInfoFromAllClusterNodes() { assertThat(Double.valueOf(clusterConnection.info().size()), closeTo(245d, 35d)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clientListShouldGetInfosForAllClients() { assertThat(clusterConnection.getClientList().isEmpty(), is(false)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getClusterNodeForKeyShouldReturnNodeCorrectly() { assertThat((RedisNode) clusterConnection.clusterGetNodeForKey(KEY_1_BYTES), is(new RedisNode("127.0.0.1", 7380))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void countKeysShouldReturnNumberOfKeysInSlot() { nativeConnection.set(SAME_SLOT_KEY_1, VALUE_1); @@ -2235,10 +1734,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.clusterCountKeysInSlot(ClusterSlotHashUtil.calculateSlot(SAME_SLOT_KEY_1)), is(2L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfAddShouldAddValuesCorrectly() { clusterConnection.pfAdd(KEY_1_BYTES, VALUE_1_BYTES, VALUE_2_BYTES, VALUE_3_BYTES); @@ -2246,10 +1742,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(((RedisHLLCommands) nativeConnection).pfcount(KEY_1), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfCountShouldAllowCountingOnSingleKey() { ((RedisHLLCommands) nativeConnection).pfadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -2257,10 +1750,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pfCount(KEY_1_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfCountShouldAllowCountingOnSameSlotKeys() { ((RedisHLLCommands) nativeConnection).pfadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -2269,10 +1759,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(clusterConnection.pfCount(SAME_SLOT_KEY_1_BYTES, SAME_SLOT_KEY_2_BYTES), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void pfCountShouldThrowErrorCountingOnDifferentSlotKeys() { ((RedisHLLCommands) nativeConnection).pfadd(KEY_1, VALUE_1, VALUE_2); @@ -2281,10 +1768,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { clusterConnection.pfCount(KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void pfMergeShouldWorkWhenAllKeysMapToSameSlot() { ((RedisHLLCommands) nativeConnection).pfadd(SAME_SLOT_KEY_1, VALUE_1, VALUE_2); @@ -2295,18 +1779,12 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(((RedisHLLCommands) nativeConnection).pfcount(SAME_SLOT_KEY_3), is(3L)); } - /** - * @see DATAREDIS-315 - */ - @Test(expected = DataAccessException.class) + @Test(expected = DataAccessException.class) // DATAREDIS-315 public void pfMergeShouldThrowErrorOnDifferentSlotKeys() { clusterConnection.pfMerge(KEY_3_BYTES, KEY_1_BYTES, KEY_2_BYTES); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectInfoForSpecificNode() { Properties properties = clusterConnection.info(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT)); @@ -2314,10 +1792,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(properties.getProperty("tcp_port"), is(Integer.toString(MASTER_NODE_2_PORT))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void infoShouldCollectInfoForSpecificNodeAndSection() { Properties properties = clusterConnection.info(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_2_PORT), "server"); @@ -2326,10 +1801,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(properties.getProperty("used_memory"), nullValue()); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getConfigShouldLoadCumulatedConfiguration() { List result = clusterConnection.getConfig("*max-*-entries*"); @@ -2347,10 +1819,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { } } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void getConfigShouldLoadConfigurationOfSpecificNode() { List result = clusterConnection.getConfig(new RedisClusterNode(CLUSTER_HOST, SLAVEOF_NODE_1_PORT), "*"); @@ -2370,10 +1839,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.get(valueIndex), endsWith("7379")); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clusterGetSlavesShouldReturnSlaveCorrectly() { Set slaves = clusterConnection @@ -2383,10 +1849,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(slaves, hasItem(new RedisClusterNode(CLUSTER_HOST, SLAVEOF_NODE_1_PORT))); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void clusterGetMasterSlaveMapShouldListMastersAndSlavesCorrectly() { Map> masterSlaveMap = clusterConnection.clusterGetMasterSlaveMap(); @@ -2399,10 +1862,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(masterSlaveMap.get(new RedisClusterNode(CLUSTER_HOST, MASTER_NODE_3_PORT)).isEmpty(), is(true)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationInSecondsShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.upsert()); @@ -2411,10 +1871,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1), is(1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationInMillisecondsShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.milliseconds(500), SetOption.upsert()); @@ -2423,20 +1880,14 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.pttl(KEY_1).doubleValue(), is(closeTo(500d, 499d))); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithOptionIfPresentShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); clusterConnection.set(KEY_1_BYTES, VALUE_2_BYTES, Expiration.persistent(), SetOption.ifPresent()); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithOptionIfAbsentShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.persistent(), SetOption.ifAbsent()); @@ -2445,10 +1896,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1), is(-1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfAbsentShouldWorkCorrectly() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.ifAbsent()); @@ -2457,10 +1905,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.ttl(KEY_1), is(1L)); } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfAbsentShouldNotBeAppliedWhenKeyExists() { nativeConnection.set(KEY_1, VALUE_1); @@ -2473,10 +1918,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfPresentShouldWorkCorrectly() { nativeConnection.set(KEY_1, VALUE_1); @@ -2489,10 +1931,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { } - /** - * @see DATAREDIS-316 - */ - @Test + @Test // DATAREDIS-316 public void setWithExpirationAndIfPresentShouldNotBeAppliedWhenKeyDoesNotExists() { clusterConnection.set(KEY_1_BYTES, VALUE_1_BYTES, Expiration.seconds(1), SetOption.ifPresent()); @@ -2500,29 +1939,20 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(nativeConnection.exists(KEY_1), is(0L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoAddSingleGeoLocation() { assertThat(clusterConnection.geoAdd(KEY_1_BYTES, PALERMO_BYTES), is(1L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoAddMultipleGeoLocations() { assertThat(clusterConnection.geoAdd(KEY_1_BYTES, Arrays.asList(PALERMO_BYTES, ARIGENTO_BYTES, CATANIA_BYTES, PALERMO_BYTES)), is(3L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoDist() { @@ -2535,10 +1965,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(distance.getUnit(), is("m")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoDistWithMetric() { @@ -2553,10 +1980,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoHash() { @@ -2567,10 +1991,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result, contains("sqc8b49rny0", "sqdtr74hyu0")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoHashNonExisting() { @@ -2582,10 +2003,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result, contains("sqc8b49rny0", (String) null, "sqdtr74hyu0")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoPosition() { @@ -2601,10 +2019,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(positions.get(1).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoPositionNonExisting() { @@ -2623,10 +2038,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(positions.get(2).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldReturnMembersCorrectly() { @@ -2639,10 +2051,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldReturnDistanceCorrectly() { @@ -2658,10 +2067,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusShouldApplyLimit() { @@ -2675,10 +2081,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldReturnMembersCorrectly() { @@ -2693,10 +2096,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(1).getContent().getName(), is(ARIGENTO_BYTES.getName())); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldReturnDistanceCorrectly() { @@ -2712,10 +2112,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRadiusByMemberShouldApplyLimit() { @@ -2729,10 +2126,7 @@ public class LettuceClusterConnectionTests implements ClusterConnectionTests { assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 @IfProfileValue(name = "redisVersion", value = "3.2+") public void geoRemoveDeletesMembers() { diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionUnitTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionUnitTests.java index 5907462de..4fadb5d31 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionUnitTests.java @@ -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.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.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 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); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryTests.java index 72744f1a4..2abb52c8f 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryTests.java @@ -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. @@ -280,10 +280,7 @@ public class LettuceConnectionFactoryTests { conn.close(); } - /** - * @see DATAREDIS-431 - */ - @Test + @Test // DATAREDIS-431 public void dbIndexShouldBePropagatedCorrectly() { LettuceConnectionFactory factory = new LettuceConnectionFactory(); @@ -307,10 +304,7 @@ public class LettuceConnectionFactoryTests { } } - /** - * @see DATAREDIS-462 - */ - @Test + @Test // DATAREDIS-462 public void factoryWorksWithoutClientResources() { LettuceConnectionFactory factory = new LettuceConnectionFactory(); @@ -328,10 +322,7 @@ public class LettuceConnectionFactoryTests { } } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void factoryShouldReturnReactiveConnectionWhenCorrectly() { LettuceConnectionFactory factory = new LettuceConnectionFactory(); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java index 6c7344533..a1573a2ed 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java @@ -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( diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionIntegrationTests.java index 571fb952c..5012636b5 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionIntegrationTests.java @@ -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() { diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineIntegrationTests.java index 7c6b5e16c..1ca2346c8 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineIntegrationTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineTxIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineTxIntegrationTests.java index 4b089cb48..a1d2a58f4 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineTxIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionPipelineTxIntegrationTests.java @@ -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(); } diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionUnitTestSuite.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionUnitTestSuite.java index e8759340b..4e1f3992a 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionUnitTestSuite.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionUnitTestSuite.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConvertersUnitTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConvertersUnitTests.java index 8a3136342..21e31cdf8 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConvertersUnitTests.java @@ -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.emptyList())); } - /** - * @see DATAREDIS-268 - */ - @Test + @Test // DATAREDIS-268 public void convertingNullToListOfRedisClientInfoShouldReturnEmptyList() { assertThat(LettuceConverters.toListOfRedisClientInformation(null), equalTo(Collections.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()); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterCommandsTestsBase.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterCommandsTestsBase.java index 41ab5e1dd..2729908bd 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterCommandsTestsBase.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterCommandsTestsBase.java @@ -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. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.core.Is.*; diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommandsTests.java index be5228c89..d00f11edb 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterHyperLogLogCommandsTests.java @@ -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. @@ -13,23 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/* - * Copyright 2016. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.core.Is.*; @@ -45,10 +28,7 @@ import org.junit.Test; */ public class LettuceReactiveClusterHyperLogLogCommandsTests extends LettuceReactiveClusterCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfCountWithMultipleKeysShouldReturnCorrectlyWhenKeysMapToSameSlot() { nativeCommands.pfadd(SAME_SLOT_KEY_1, new String[] { VALUE_1, VALUE_2 }); @@ -58,10 +38,7 @@ public class LettuceReactiveClusterHyperLogLogCommandsTests extends LettuceReact .block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfMergeShouldWorkCorrectlyWhenKeysMapToSameSlot() { nativeCommands.pfadd(SAME_SLOT_KEY_1, new String[] { VALUE_1, VALUE_2 }); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommandsTests.java index 022ed81b5..b8dade3cd 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterKeyCommandsTests.java @@ -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. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.collection.IsCollectionWithSize.*; @@ -39,10 +38,7 @@ public class LettuceReactiveClusterKeyCommandsTests extends LettuceReactiveClust static final RedisClusterNode NODE_1 = newRedisClusterNode().listeningAt("127.0.0.1", 7379).build(); - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void keysShouldReturnOnlyKeysFromSelectedNode() { nativeCommands.set(KEY_1, VALUE_1); @@ -53,10 +49,7 @@ public class LettuceReactiveClusterKeyCommandsTests extends LettuceReactiveClust assertThat(result, contains(KEY_1_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void randomkeyShouldReturnOnlyKeysFromSelectedNode() { nativeCommands.set(KEY_1, VALUE_1); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommandsTests.java index 67dfae8ac..c8fd0c3cf 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterListCommandsTests.java @@ -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. @@ -13,23 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/* - * Copyright 2016. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.core.Is.*; @@ -49,10 +32,7 @@ import org.springframework.data.redis.connection.ReactiveListCommands; */ public class LettuceReactiveClusterListCommandsTests extends LettuceReactiveClusterCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bRPopLPushShouldWorkCorrectlyWhenAllKeysMapToSameSlot() { nativeCommands.rpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -66,10 +46,7 @@ public class LettuceReactiveClusterListCommandsTests extends LettuceReactiveClus assertThat(nativeCommands.lindex(SAME_SLOT_KEY_2, 0), is(equalTo(VALUE_3))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void blPopShouldReturnFirstAvailableWhenAllKeysMapToTheSameSlot() { nativeCommands.rpush(SAME_SLOT_KEY_1, VALUE_1, VALUE_2, VALUE_3); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommandsTests.java index 9b67f4d22..cd9595067 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommandsTests.java @@ -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. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.core.Is.*; @@ -35,10 +34,7 @@ import org.springframework.data.redis.connection.RedisStringCommands; */ public class LettuceReactiveClusterStringCommandsTests extends LettuceReactiveClusterCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mSetNXShouldAddMultipleKeyValueParisWhenMappedToSameSlot() { Map map = new LinkedHashMap<>(); @@ -51,10 +47,7 @@ public class LettuceReactiveClusterStringCommandsTests extends LettuceReactiveCl assertThat(nativeCommands.get(SAME_SLOT_KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mSetNXShouldNotAddMultipleKeyValueParisWhenAlreadyExitAndMapToSameSlot() { nativeCommands.set(SAME_SLOT_KEY_2, VALUE_2); @@ -69,10 +62,7 @@ public class LettuceReactiveClusterStringCommandsTests extends LettuceReactiveCl assertThat(nativeCommands.get(SAME_SLOT_KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitOpAndShouldWorkAsExpectedWhenKeysMapToSameSlot() { nativeCommands.set(SAME_SLOT_KEY_1, VALUE_1); @@ -83,10 +73,7 @@ public class LettuceReactiveClusterStringCommandsTests extends LettuceReactiveCl assertThat(nativeCommands.get(SAME_SLOT_KEY_3), is(equalTo("value-0"))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitOpOrShouldWorkAsExpectedWhenKeysMapToSameSlot() { nativeCommands.set(SAME_SLOT_KEY_1, VALUE_1); @@ -97,10 +84,7 @@ public class LettuceReactiveClusterStringCommandsTests extends LettuceReactiveCl assertThat(nativeCommands.get(SAME_SLOT_KEY_3), is(equalTo(VALUE_3))); } - /** - * @see DATAREDIS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAREDIS-525 public void bitNotShouldThrowExceptionWhenMoreThanOnSourceKeyAndKeysMapToSameSlot() { connection.stringCommands().bitOp(Arrays.asList(SAME_SLOT_KEY_1_BBUFFER, SAME_SLOT_KEY_2_BBUFFER), diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommandsTests.java index 1f22d5aae..9cccf452c 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterZSetCommandsTests.java @@ -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. @@ -13,23 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/* - * Copyright 2016. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.data.redis.connection.lettuce; import static org.hamcrest.core.Is.*; @@ -45,10 +28,7 @@ import org.junit.Test; */ public class LettuceReactiveClusterZSetCommandsTests extends LettuceReactiveClusterCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zUnionStoreShouldWorkWhenAllKeysMapToSameSlot() { nativeCommands.zadd(SAME_SLOT_KEY_1, 1D, VALUE_1); @@ -62,10 +42,7 @@ public class LettuceReactiveClusterZSetCommandsTests extends LettuceReactiveClus } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zInterStoreShouldWorkCorrectlyWhenKeysMapToSameSlot() { nativeCommands.zadd(SAME_SLOT_KEY_1, 1D, VALUE_1); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveGeoCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveGeoCommandsTests.java index baa97eeaf..454a796a4 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveGeoCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveGeoCommandsTests.java @@ -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. @@ -57,27 +57,18 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest private static final GeoLocation PALERMO = new GeoLocation<>( ByteBuffer.wrap(PALERMO_MEMBER_NAME.getBytes(Charset.forName("UTF-8"))), POINT_PALERMO); - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoAddShouldAddSingleGeoLocationCorrectly() { assertThat(connection.geoCommands().geoAdd(KEY_1_BBUFFER, ARIGENTO).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoAddShouldAddMultipleGeoLocationsCorrectly() { assertThat(connection.geoCommands().geoAdd(KEY_1_BBUFFER, Arrays.asList(ARIGENTO, CATANIA, PALERMO)).block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoDistShouldReturnDistanceInMetersByDefault() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -87,10 +78,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest is(closeTo(166274.15156960033D, 0.005))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoDistShouldReturnDistanceInDesiredMetric() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -100,10 +88,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest .block().getValue(), is(closeTo(166.27415156960033D, 0.005))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoHash() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -114,10 +99,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest contains("sqc8b49rny0", "sqdtr74hyu0")); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoHashNotExisting() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -129,10 +111,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest contains("sqc8b49rny0", null, "sqdtr74hyu0")); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoPos() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -147,10 +126,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.get(1).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoPosNonExisting() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -167,10 +143,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.get(2).getY(), is(closeTo(POINT_CATANIA.getY(), 0.005))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusShouldReturnMembersCorrectly() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -187,10 +160,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest hasSize(2)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusShouldReturnDistanceCorrectly() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -204,10 +174,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusShouldApplyLimit() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -220,10 +187,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.getContent(), hasSize(2)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusByMemberShouldReturnMembersCorrectly() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -237,10 +201,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.get(1).getName(), is(PALERMO.getName())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusByMemberShouldReturnDistanceCorrectly() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); @@ -255,10 +216,7 @@ public class LettuceReactiveGeoCommandsTests extends LettuceReactiveCommandsTest assertThat(result.getContent().get(0).getDistance().getUnit(), is("km")); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void geoRadiusByMemberShouldApplyLimit() { nativeCommands.geoadd(KEY_1, PALERMO.getPoint().getX(), PALERMO.getPoint().getY(), PALERMO_MEMBER_NAME); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHashCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHashCommandsTests.java index 8040c9b07..6977068e2 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHashCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHashCommandsTests.java @@ -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. @@ -49,26 +49,17 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes static final ByteBuffer FIELD_2_BBUFFER = ByteBuffer.wrap(FIELD_2_BYTES); static final ByteBuffer FIELD_3_BBUFFER = ByteBuffer.wrap(FIELD_3_BYTES); - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hSetShouldOperateCorrectly() { assertThat(connection.hashCommands().hSet(KEY_1_BBUFFER, FIELD_1_BBUFFER, VALUE_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hSetNxShouldOperateCorrectly() { assertThat(connection.hashCommands().hSetNX(KEY_1_BBUFFER, FIELD_1_BBUFFER, VALUE_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hSetNxShouldReturnFalseIfFieldAlreadyExists() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -76,10 +67,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hSetNX(KEY_1_BBUFFER, FIELD_1_BBUFFER, VALUE_1_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hGetShouldReturnValueForExistingField() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -89,10 +77,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hGet(KEY_1_BBUFFER, FIELD_1_BBUFFER).block(), is(equalTo(VALUE_1_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hGetShouldReturnNullForNotExistingField() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -100,10 +85,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hGet(KEY_1_BBUFFER, FIELD_2_BBUFFER).block(), is(nullValue())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hMGetShouldReturnValueForFields() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -114,10 +96,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes contains(VALUE_1_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hMGetShouldReturnNullValueForFieldsThatHaveNoValue() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -128,10 +107,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes contains(VALUE_1_BBUFFER, null, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hMSetSouldSetValuesCorrectly() { Map fieldValues = new LinkedHashMap<>(); @@ -143,10 +119,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(nativeCommands.hget(KEY_1, FIELD_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hExistsShouldReturnTrueForExistingField() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -154,18 +127,12 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hExists(KEY_1_BBUFFER, FIELD_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hExistsShouldReturnFalseForNonExistingField() { assertThat(connection.hashCommands().hExists(KEY_1_BBUFFER, FIELD_1_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hDelShouldRemoveSingleFieldsCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -175,10 +142,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hDel(KEY_1_BBUFFER, FIELD_2_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hDelShouldRemoveMultipleFieldsCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -189,10 +153,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hLenShouldReturnSizeCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -202,10 +163,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.hashCommands().hLen(KEY_1_BBUFFER).block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hKeysShouldReturnFieldsCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -216,10 +174,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes containsInAnyOrder(FIELD_1_BBUFFER, FIELD_2_BBUFFER, FIELD_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hValsShouldReturnValuesCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); @@ -230,10 +185,7 @@ public class LettuceReactiveHashCommandsTests extends LettuceReactiveCommandsTes containsInAnyOrder(VALUE_1_BBUFFER, VALUE_2_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hGetAllShouldReturnEntriesCorrectly() { nativeCommands.hset(KEY_1, FIELD_1, VALUE_1); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHyperLogLogCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHyperLogLogCommandsTests.java index 53abc8662..fd7b6c23b 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHyperLogLogCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveHyperLogLogCommandsTests.java @@ -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. @@ -29,20 +29,14 @@ import org.springframework.data.redis.test.util.LettuceRedisClientProvider; */ public class LettuceReactiveHyperLogLogCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfAddShouldAddToNonExistingKeyCorrectly() { assertThat(connection.hyperLogLogCommands() .pfAdd(KEY_1_BBUFFER, Arrays.asList(VALUE_1_BBUFFER, VALUE_2_BBUFFER, VALUE_3_BBUFFER)).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfAddShouldReturnZeroWhenValueAlreadyExists() { nativeCommands.pfadd(KEY_1, new String[] { VALUE_1, VALUE_2 }); @@ -51,10 +45,7 @@ public class LettuceReactiveHyperLogLogCommandsTests extends LettuceReactiveComm assertThat(connection.hyperLogLogCommands().pfAdd(KEY_1_BBUFFER, Arrays.asList(VALUE_1_BBUFFER)).block(), is(0L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfCountShouldReturnCorrectly() { nativeCommands.pfadd(KEY_1, new String[] { VALUE_1, VALUE_2 }); @@ -62,10 +53,7 @@ public class LettuceReactiveHyperLogLogCommandsTests extends LettuceReactiveComm assertThat(connection.hyperLogLogCommands().pfCount(KEY_1_BBUFFER).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfCountWithMultipleKeysShouldReturnCorrectly() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -76,10 +64,7 @@ public class LettuceReactiveHyperLogLogCommandsTests extends LettuceReactiveComm assertThat(connection.hyperLogLogCommands().pfCount(Arrays.asList(KEY_1_BBUFFER, KEY_2_BBUFFER)).block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pfMergeShouldWorkCorrectly() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveKeyCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveKeyCommandsTests.java index 29bd7a4b5..c1c6435da 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveKeyCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveKeyCommandsTests.java @@ -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. @@ -37,10 +37,7 @@ import reactor.test.TestSubscriber; */ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void existsShouldReturnTrueForExistingKeys() { nativeCommands.set(KEY_1, VALUE_1); @@ -48,18 +45,12 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.keyCommands().exists(KEY_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void existsShouldReturnFalseForNonExistingKeys() { assertThat(connection.keyCommands().exists(KEY_1_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void typeShouldReturnTypeCorrectly() { nativeCommands.set(KEY_1, VALUE_2); @@ -71,10 +62,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.keyCommands().type(KEY_3_BBUFFER).block(), is(DataType.HASH)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void keysShouldReturnCorrectly() { nativeCommands.set(KEY_1, VALUE_2); @@ -89,10 +77,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.keyCommands().keys(ByteBuffer.wrap("key*".getBytes())).block(), hasSize(3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void randomKeyShouldReturnAnyKey() { nativeCommands.set(KEY_1, VALUE_2); @@ -102,18 +87,12 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.keyCommands().randomKey().block(), is(notNullValue())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void randomKeyShouldReturnNullWhenNoKeyExists() { assertThat(connection.keyCommands().randomKey().block(), is(nullValue())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void renameShouldAlterKeyNameCorrectly() { nativeCommands.set(KEY_1, VALUE_2); @@ -123,18 +102,12 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.exists(KEY_1), is(0L)); } - /** - * @see DATAREDIS-525 - */ - @Test(expected = RedisSystemException.class) + @Test(expected = RedisSystemException.class) // DATAREDIS-525 public void renameShouldThrowErrorWhenKeyDoesNotExit() { assertThat(connection.keyCommands().rename(KEY_1_BBUFFER, KEY_2_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void renameNXShouldAlterKeyNameCorrectly() { nativeCommands.set(KEY_1, VALUE_2); @@ -145,10 +118,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.exists(KEY_1), is(0L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void renameNXShouldNotAlterExistingKeyName() { nativeCommands.set(KEY_1, VALUE_2); @@ -157,10 +127,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.keyCommands().renameNX(KEY_1_BBUFFER, KEY_2_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void shouldDeleteKeyCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -169,10 +136,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(result.block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void shouldDeleteKeysCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -188,10 +152,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest subscriber.assertValueCount(2); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void shouldDeleteKeysInBatchCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -202,10 +163,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest assertThat(result.block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void shouldDeleteKeysInMultipleBatchesCorrectly() { nativeCommands.set(KEY_1, VALUE_1); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveListCommandTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveListCommandTests.java index cb2ca4ec8..41156a7a8 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveListCommandTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveListCommandTests.java @@ -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. @@ -41,10 +41,7 @@ import reactor.core.publisher.Mono; */ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void rPushShouldAppendValuesCorrectly() { nativeCommands.lpush(KEY_1, VALUE_1); @@ -54,10 +51,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lPushShouldPrependValuesCorrectly() { nativeCommands.lpush(KEY_1, VALUE_1); @@ -67,10 +61,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_3, VALUE_2, VALUE_1)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void rPushXShouldAppendValuesCorrectly() { nativeCommands.lpush(KEY_1, VALUE_1); @@ -79,10 +70,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lPushXShouldPrependValuesCorrectly() { nativeCommands.lpush(KEY_1, VALUE_1); @@ -91,10 +79,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_2, VALUE_1)); } - /** - * @see DATAREDIS-525 - */ - @Test(expected = InvalidDataAccessApiUsageException.class) + @Test(expected = InvalidDataAccessApiUsageException.class) // DATAREDIS-525 public void pushShouldThrowErrorForMoreThanOneValueWhenUsingExistsOption() { connection.listCommands() @@ -103,10 +88,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest .blockFirst(); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lLenShouldReturnSizeCorrectly() { nativeCommands.lpush(KEY_1, VALUE_1, VALUE_2); @@ -114,10 +96,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(connection.listCommands().lLen(KEY_1_BBUFFER).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lRangeShouldReturnValuesCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -126,10 +105,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest contains(VALUE_2_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lTrimShouldReturnValuesCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -138,10 +114,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), not(contains(VALUE_1_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lIndexShouldReturnValueCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -149,10 +122,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(connection.listCommands().lIndex(KEY_1_BBUFFER, 1).block(), is(equalTo(VALUE_2_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lInsertShouldAddValueCorrectlyBeforeExisting() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2); @@ -163,10 +133,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_3, VALUE_2)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lInsertShouldAddValueCorrectlyAfterExisting() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2); @@ -177,10 +144,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lSetSouldSetValueCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2); @@ -190,10 +154,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), not(contains(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lRemSouldRemoveAllValuesCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_1, VALUE_3); @@ -203,10 +164,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), not(contains(VALUE_1))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lRemSouldRemoveFirstValuesCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_1, VALUE_3); @@ -215,10 +173,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_2, VALUE_1, VALUE_3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lRemSouldRemoveLastValuesCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_1, VALUE_3); @@ -227,10 +182,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void lPopSouldRemoveFirstValueCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -239,10 +191,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_2, VALUE_3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void rPopSouldRemoveFirstValueCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -251,10 +200,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lrange(KEY_1, 0, -1), contains(VALUE_1, VALUE_2)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void blPopShouldReturnFirstAvailable() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -267,10 +213,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(result.getValue(), is(equalTo(VALUE_1_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void brPopShouldReturnLastAvailable() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -283,10 +226,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(result.getValue(), is(equalTo(VALUE_3_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void rPopLPushShouldWorkCorrectly() { nativeCommands.rpush(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -299,10 +239,7 @@ public class LettuceReactiveListCommandTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.lindex(KEY_2, 0), is(equalTo(VALUE_3))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void brPopLPushShouldWorkCorrectly() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveNumberCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveNumberCommandsTests.java index b1dd8604a..7d2a63ae6 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveNumberCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveNumberCommandsTests.java @@ -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. @@ -26,42 +26,27 @@ import org.junit.Test; */ public class LettuceReactiveNumberCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void incrByDoubleShouldIncreaseValueCorrectly() { assertThat(connection.numberCommands().incrBy(KEY_1_BBUFFER, 1.5D).block(), is(closeTo(1.5D, 0D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void incrByIntegerShouldIncreaseValueCorrectly() { assertThat(connection.numberCommands().incrBy(KEY_1_BBUFFER, 3).block(), is(3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void decrByDoubleShouldDecreaseValueCorrectly() { assertThat(connection.numberCommands().decrBy(KEY_1_BBUFFER, 1.5D).block(), is(closeTo(-1.5D, 0D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void decrByIntegerShouldDecreaseValueCorrectly() { assertThat(connection.numberCommands().decrBy(KEY_1_BBUFFER, 3).block(), is(-3)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hIncrByDoubleShouldIncreaseValueCorrectly() { nativeCommands.hset(KEY_1, KEY_1, "2"); @@ -69,10 +54,7 @@ public class LettuceReactiveNumberCommandsTests extends LettuceReactiveCommandsT assertThat(connection.numberCommands().hIncrBy(KEY_1_BBUFFER, KEY_1_BBUFFER, 1.5D).block(), is(closeTo(3.5D, 0D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void hIncrByIntegerShouldIncreaseValueCorrectly() { nativeCommands.hset(KEY_1, KEY_1, "2"); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveSetCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveSetCommandsTests.java index a3827de59..233b216e5 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveSetCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveSetCommandsTests.java @@ -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. @@ -32,27 +32,18 @@ import org.junit.Test; public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sAddShouldAddSingleValue() { assertThat(connection.setCommands().sAdd(KEY_1_BBUFFER, VALUE_1_BBUFFER).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sAddShouldAddValues() { assertThat(connection.setCommands().sAdd(KEY_1_BBUFFER, Arrays.asList(VALUE_1_BBUFFER, VALUE_2_BBUFFER)).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sRemShouldRemoveSingleValue() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -61,10 +52,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_1, VALUE_1), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sRemShouldRemoveValues() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -75,10 +63,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_1, VALUE_2), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sPopShouldRetrieveRandomValue() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -86,18 +71,12 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.setCommands().sPop(KEY_1_BBUFFER).block(), is(notNullValue())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sPopShouldReturnNullWhenNotPresent() { assertThat(connection.setCommands().sPop(KEY_1_BBUFFER).block(), is(nullValue())); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sMoveShouldMoveValueCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -107,10 +86,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_2, VALUE_3), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sMoveShouldReturnFalseIfValueIsNotAMember() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -120,10 +96,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_2, VALUE_3), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sMoveShouldReturnOperateCorrectlyWhenValueAlreadyPresentInTarget() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -134,10 +107,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_2, VALUE_3), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sCardShouldCountValuesCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -145,10 +115,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.setCommands().sCard(KEY_1_BBUFFER).block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sIsMemberShouldReturnTrueWhenValueContainedInKey() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -156,10 +123,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.setCommands().sIsMember(KEY_1_BBUFFER, VALUE_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sIsMemberShouldReturnFalseWhenValueNotContainedInKey() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -167,10 +131,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(connection.setCommands().sIsMember(KEY_1_BBUFFER, VALUE_3_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sInterShouldIntersectSetsCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -181,10 +142,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(result, not(containsInAnyOrder(VALUE_1_BBUFFER, VALUE_3_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sInterStoreShouldReturnSizeCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -195,10 +153,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(nativeCommands.sismember(KEY_3, VALUE_2), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sUnionShouldCombineSetsCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -208,10 +163,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(result, containsInAnyOrder(VALUE_1_BBUFFER, VALUE_3_BBUFFER, VALUE_2_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sUnionStoreShouldReturnSizeCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -221,10 +173,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sDiffShouldBeExcecutedCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -235,10 +184,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest assertThat(result, not(containsInAnyOrder(VALUE_2_BBUFFER, VALUE_3_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sDiffStoreShouldBeExcecutedCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2); @@ -248,10 +194,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sMembersReadsValuesFromSetCorrectly() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -260,10 +203,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest containsInAnyOrder(VALUE_1_BBUFFER, VALUE_2_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sRandMemberReturnsRandomMember() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); @@ -272,10 +212,7 @@ public class LettuceReactiveSetCommandsTests extends LettuceReactiveCommandsTest anyOf(equalTo(VALUE_1_BBUFFER), equalTo(VALUE_2_BBUFFER), equalTo(VALUE_3_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void sRandMemberReturnsRandomMembers() { nativeCommands.sadd(KEY_1, VALUE_1, VALUE_2, VALUE_3); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveStringCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveStringCommandsTests.java index f2ab1c3ad..ca35ee46d 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveStringCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveStringCommandsTests.java @@ -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. @@ -48,10 +48,7 @@ import reactor.test.TestSubscriber; */ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getSetShouldReturnPreviousValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -62,10 +59,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_1), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getSetShouldReturnPreviousValueCorrectlyWhenNoExists() { Mono result = connection.stringCommands().getSet(KEY_1_BBUFFER, VALUE_2_BBUFFER); @@ -76,10 +70,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_1), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setShouldAddValueCorrectly() { Mono result = connection.stringCommands().set(KEY_1_BBUFFER, VALUE_1_BBUFFER); @@ -88,10 +79,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_1), is(equalTo(VALUE_1))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setShouldAddValuesCorrectly() { Flux> result = connection.stringCommands() @@ -107,10 +95,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getShouldRetriveValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -119,20 +104,14 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(result.block(), is(equalTo(VALUE_1_BBUFFER))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getShouldRetriveNullValueCorrectly() { Mono result = connection.stringCommands().get(KEY_1_BBUFFER); assertThat(result.block(), is(equalTo(ByteBuffer.allocate(0)))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getShouldRetriveValuesCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -148,10 +127,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT subscriber.assertValueCount(2); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getShouldRetriveValuesWithNullCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -167,10 +143,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT subscriber.assertValueCount(3); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mGetShouldRetriveValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -180,10 +153,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(result.block(), contains(VALUE_1_BBUFFER, VALUE_2_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mGetShouldRetriveNullValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -195,10 +165,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(result.block(), contains(VALUE_1_BBUFFER, ByteBuffer.allocate(0), VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mGetShouldRetriveValuesCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -218,18 +185,12 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT new HashSet<>(Arrays.asList(Arrays.asList(VALUE_1_BBUFFER, VALUE_2_BBUFFER), Arrays.asList(VALUE_2_BBUFFER)))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setNXshouldOnlySetValueWhenNotPresent() { assertThat(connection.stringCommands().setNX(KEY_1_BBUFFER, VALUE_1_BBUFFER).block(), is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setNXshouldNotSetValueWhenAlreadyPresent() { nativeCommands.setnx(KEY_1, VALUE_1); @@ -237,10 +198,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(connection.stringCommands().setNX(KEY_1_BBUFFER, VALUE_2_BBUFFER).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setEXshouldSetKeyAndExpirationTime() { connection.stringCommands().setEX(KEY_1_BBUFFER, VALUE_1_BBUFFER, Expiration.seconds(3)).block(); @@ -248,10 +206,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.ttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void pSetEXshouldSetKeyAndExpirationTime() { connection.stringCommands().pSetEX(KEY_1_BBUFFER, VALUE_1_BBUFFER, Expiration.milliseconds(600)).block(); @@ -259,10 +214,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.pttl(KEY_1) > 1, is(true)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mSetShouldAddMultipleKeyValueParis() { Map map = new LinkedHashMap<>(); @@ -275,10 +227,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mSetNXShouldAddMultipleKeyValueParis() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -293,10 +242,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void mSetNXShouldNotAddMultipleKeyValueParisWhenAlreadyExit() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -313,20 +259,14 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_2), is(equalTo(VALUE_2))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void appendShouldDoItsThing() { assertThat(connection.stringCommands().append(KEY_1_BBUFFER, VALUE_1_BBUFFER).block(), is(7L)); assertThat(connection.stringCommands().append(KEY_1_BBUFFER, VALUE_2_BBUFFER).block(), is(14L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getRangeShouldReturnSubstringCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -335,10 +275,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT is(equalTo(ByteBuffer.wrap("lu".getBytes())))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setRangeShouldReturnNewStringLengthCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -346,10 +283,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(connection.stringCommands().setRange(KEY_1_BBUFFER, VALUE_2_BBUFFER, 3).block(), is(10L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void getBitShouldReturnValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -358,10 +292,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(connection.stringCommands().getBit(KEY_1_BBUFFER, 7).block(), is(false)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void setBitShouldReturnValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -370,10 +301,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.getbit(KEY_1, 1), is(0L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitCountShouldReturnValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -381,10 +309,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(connection.stringCommands().bitCount(KEY_1_BBUFFER).block(), is(28L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitCountShouldCountInRangeCorrectly() { nativeCommands.set(KEY_1, VALUE_1); @@ -392,10 +317,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(connection.stringCommands().bitCount(KEY_1_BBUFFER, 2, 4).block(), is(13L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitOpAndShouldWorkAsExpected() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -408,10 +330,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_3), is(equalTo("value-0"))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void bitOpOrShouldWorkAsExpected() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -424,10 +343,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT assertThat(nativeCommands.get(KEY_3), is(equalTo(VALUE_3))); } - /** - * @see DATAREDIS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAREDIS-525 public void bitNotShouldThrowExceptionWhenMoreThanOnSourceKey() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -436,10 +352,7 @@ public class LettuceReactiveStringCommandsTests extends LettuceReactiveCommandsT .block(); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void strLenShouldReturnValueCorrectly() { nativeCommands.set(KEY_1, VALUE_1); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveZSetCommandsTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveZSetCommandsTests.java index 330f8c94a..7736bba00 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveZSetCommandsTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveZSetCommandsTests.java @@ -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. @@ -34,18 +34,12 @@ import org.springframework.data.redis.test.util.LettuceRedisClientProvider; */ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTestsBase { - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zAddShouldAddValuesWithScores() { assertThat(connection.zSetCommands().zAdd(KEY_1_BBUFFER, 3.5D, VALUE_1_BBUFFER).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemShouldRemoveValuesFromSet() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -56,10 +50,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zIncrByShouldInreaseAndReturnScore() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -67,10 +58,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zIncrBy(KEY_1_BBUFFER, 3.5D, VALUE_1_BBUFFER).block(), is(4.5D)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRankShouldReturnIndexCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -80,10 +68,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zRank(KEY_1_BBUFFER, VALUE_3_BBUFFER).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRankShouldReturnIndexCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -93,10 +78,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zRevRank(KEY_1_BBUFFER, VALUE_3_BBUFFER).block(), is(0L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeShouldReturnValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -107,10 +89,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_2_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeWithScoreShouldReturnTuplesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -122,10 +101,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes new DefaultTuple(VALUE_3_BBUFFER.array(), 3D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeShouldReturnValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -136,10 +112,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_2_BBUFFER, VALUE_1_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeWithScoreShouldReturnTuplesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -151,10 +124,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes new DefaultTuple(VALUE_1_BBUFFER.array(), 1D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreShouldReturnValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -165,10 +135,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_2_BBUFFER, VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreShouldReturnValuesCorrectlyWithMinExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -179,10 +146,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreShouldReturnValuesCorrectlyWithMaxExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -193,10 +157,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_2_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreWithScoreShouldReturnTuplesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -208,10 +169,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes new DefaultTuple(VALUE_3_BBUFFER.array(), 3D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreWithScoreShouldReturnTuplesCorrectlyWithMinExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -223,10 +181,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(new DefaultTuple(VALUE_3_BBUFFER.array(), 3D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByScoreWithScoreShouldReturnTuplesCorrectlyWithMaxExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -238,10 +193,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(new DefaultTuple(VALUE_2_BBUFFER.array(), 2D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreShouldReturnValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -252,10 +204,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_3_BBUFFER, VALUE_2_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreShouldReturnValuesCorrectlyWithMinExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -266,10 +215,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_3_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreShouldReturnValuesCorrectlyWithMaxExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -280,10 +226,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(VALUE_2_BBUFFER)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreWithScoreShouldReturnTuplesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -295,10 +238,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes new DefaultTuple(VALUE_2_BBUFFER.array(), 2D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreWithScoreShouldReturnTuplesCorrectlyWithMinExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -310,10 +250,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(new DefaultTuple(VALUE_3_BBUFFER.array(), 3D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByScoreWithScoreShouldReturnTuplesCorrectlyWithMaxExclusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -325,10 +262,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes IsIterableContainingInOrder.contains(new DefaultTuple(VALUE_2_BBUFFER.array(), 2D))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCountShouldCountValuesInRange() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -338,10 +272,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zCount(KEY_1_BBUFFER, new Range<>(2D, 3D)).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCountShouldCountValuesInRangeWithMinExlusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -351,10 +282,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zCount(KEY_1_BBUFFER, new Range<>(2D, 3D, false, true)).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCountShouldCountValuesInRangeWithMaxExlusion() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -364,10 +292,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zCount(KEY_1_BBUFFER, new Range<>(2D, 3D, true, false)).block(), is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCountShouldCountValuesInRangeWithNegativeInfinity() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -378,10 +303,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCountShouldCountValuesInRangeWithPositiveInfinity() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -392,10 +314,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zCardShouldReturnSizeCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -405,10 +324,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zCard(KEY_1_BBUFFER).block(), is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zScoreShouldReturnScoreCorrectly() { nativeCommands.zadd(KEY_1, 2D, VALUE_2); @@ -416,10 +332,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zScore(KEY_1_BBUFFER, VALUE_2_BBUFFER).block(), is(2D)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByRankShouldRemoveValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -429,10 +342,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zRemRangeByRank(KEY_1_BBUFFER, new Range<>(1L, 2L)).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByScoreShouldRemoveValuesCorrectly() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -442,10 +352,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes assertThat(connection.zSetCommands().zRemRangeByScore(KEY_1_BBUFFER, new Range<>(1D, 2D)).block(), is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByScoreShouldRemoveValuesCorrectlyWithNegativeInfinity() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -457,10 +364,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByScoreShouldRemoveValuesCorrectlyWithPositiveInfinity() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -472,10 +376,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByScoreShouldRemoveValuesCorrectlyWithExcludingMinRange() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -486,10 +387,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRemRangeByScoreShouldRemoveValuesCorrectlyWithExcludingMaxRange() { nativeCommands.zadd(KEY_1, 1D, VALUE_1); @@ -500,10 +398,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(1L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zUnionStoreShouldWorkCorrectly() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -520,10 +415,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(3L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zInterStoreShouldWorkCorrectly() { assumeThat(clientProvider instanceof LettuceRedisClientProvider, is(true)); @@ -540,10 +432,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes is(2L)); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRangeByLex() { nativeCommands.zadd(KEY_1, 0D, "a"); @@ -566,10 +455,7 @@ public class LettuceReactiveZSetCommandsTests extends LettuceReactiveCommandsTes ByteBuffer.wrap("d".getBytes()), ByteBuffer.wrap("e".getBytes()), ByteBuffer.wrap("f".getBytes()))); } - /** - * @see DATAREDIS-525 - */ - @Test + @Test // DATAREDIS-525 public void zRevRangeByLex() { nativeCommands.zadd(KEY_1, 0D, "a"); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelConnectionUnitTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelConnectionUnitTests.java index b38b00ddb..e8f7f31e9 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelConnectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelConnectionUnitTests.java @@ -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.>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.>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.>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); diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelIntegrationTests.java index ab02cd35c..a4fa98b29 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceSentinelIntegrationTests.java @@ -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 servers = (List) 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); diff --git a/src/test/java/org/springframework/data/redis/core/AbstractOperationsTestParams.java b/src/test/java/org/springframework/data/redis/core/AbstractOperationsTestParams.java index 1e7a839bf..bb392f8c0 100644 --- a/src/test/java/org/springframework/data/redis/core/AbstractOperationsTestParams.java +++ b/src/test/java/org/springframework/data/redis/core/AbstractOperationsTestParams.java @@ -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 testParams() { ObjectFactory stringFactory = new StringObjectFactory(); diff --git a/src/test/java/org/springframework/data/redis/core/ConnectionSplittingInterceptorUnitTests.java b/src/test/java/org/springframework/data/redis/core/ConnectionSplittingInterceptorUnitTests.java index 6d64b5825..089a2a454 100644 --- a/src/test/java/org/springframework/data/redis/core/ConnectionSplittingInterceptorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/ConnectionSplittingInterceptorUnitTests.java @@ -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( diff --git a/src/test/java/org/springframework/data/redis/core/DefaultClusterOperationsUnitTests.java b/src/test/java/org/springframework/data/redis/core/DefaultClusterOperationsUnitTests.java index 610c5c4ce..a3f10cc68 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultClusterOperationsUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultClusterOperationsUnitTests.java @@ -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(template); } - /** - * @see DATAREDIS-315 - */ - @Test + @Test // DATAREDIS-315 public void keysShouldDelegateToConnectionCorrectly() { Set keys = new HashSet(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. 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. 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(); diff --git a/src/test/java/org/springframework/data/redis/core/DefaultGeoOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultGeoOperationsTests.java index b8d326508..95b003841 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultGeoOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultGeoOperationsTests.java @@ -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 { }); } - /** - * @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 { assertThat(numAdded, is(1L)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 public void testGeoAddWithLocationMap() { Map memberCoordinateMap = new HashMap(); @@ -139,10 +133,7 @@ public class DefaultGeoOperationsTests { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { assertThat(result.getContent().get(1).getContent().getName(), is(member3)); } - /** - * @see DATAREDIS-438 - */ - @Test + @Test // DATAREDIS-438 public void testGeoRemove() { K key = keyFactory.instance(); diff --git a/src/test/java/org/springframework/data/redis/core/DefaultHashOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultHashOperationsTests.java index a25fac8d5..9418ba06d 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultHashOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultHashOperationsTests.java @@ -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 { assertEquals(2L, numDeleted.longValue()); } - /** - * @see DATAREDIS-305 - */ - @Test + @Test // DATAREDIS-305 @IfProfileValue(name = "redisVersion", value = "2.8+") public void testHScanReadsValuesFully() throws IOException { diff --git a/src/test/java/org/springframework/data/redis/core/DefaultHyperLogLogOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultHyperLogLogOperationsTests.java index 88ce8af4f..23520e5a4 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultHyperLogLogOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultHyperLogLogOperationsTests.java @@ -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 { }); } - /** - * @see DATAREDIS - */ - @Test + @Test // DATAREDIS-308 @SuppressWarnings("unchecked") public void addShouldAddDistinctValuesCorrectly() { @@ -101,10 +98,7 @@ public class DefaultHyperLogLogOperationsTests { 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 { 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 { 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 { assertThat(hyperLogLogOps.size(key, key2), equalTo(4L)); } - /** - * @throws InterruptedException - * @see DATAREDIS-308 - */ - @Test + @Test // DATAREDIS-308 @SuppressWarnings("unchecked") public void unionShouldMergeValuesOfMultipleKeysCorrectly() throws InterruptedException { diff --git a/src/test/java/org/springframework/data/redis/core/DefaultListOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultListOperationsTests.java index def76f617..9038870aa 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultListOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultListOperationsTests.java @@ -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 { 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 { 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. 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) null); } - /** - * @see DATAREDIS-288 - */ - @Test + @Test // DATAREDIS-288 @SuppressWarnings("unchecked") public void testLeftPushAllCollection() { @@ -245,27 +230,18 @@ public class DefaultListOperationsTests { 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. 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) null); } diff --git a/src/test/java/org/springframework/data/redis/core/DefaultSetOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultSetOperationsTests.java index 034fd5a98..8dca965c0 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultSetOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultSetOperationsTests.java @@ -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 { 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 { assertThat(count, is(setOps.size(key))); } - /** - * @see DATAREDIS-448 - */ - @Test + @Test // DATAREDIS-448 public void intersectAndStoreShouldReturnNumberOfElementsInDestination() { K sourceKey1 = keyFactory.instance(); diff --git a/src/test/java/org/springframework/data/redis/core/DefaultTypedTupleUnitTests.java b/src/test/java/org/springframework/data/redis/core/DefaultTypedTupleUnitTests.java index 1421645e0..bb1f5bba2 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultTypedTupleUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultTypedTupleUnitTests.java @@ -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 WITH_SCORE_2 = new DefaultTypedTuple("bar", 2D); private static final TypedTuple WITH_SCORE_NULL = new DefaultTypedTuple("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)); diff --git a/src/test/java/org/springframework/data/redis/core/DefaultValueOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultValueOperationsTests.java index 6bfe1f892..b417b2b1f 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultValueOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultValueOperationsTests.java @@ -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 { 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 { }, 1000); } - /** - * @see DATAREDIS-271 - */ - @Test + @Test // DATAREDIS-271 public void testSetWithExpirationWithTimeUnitMilliseconds() { assumeTrue(RedisTestProfileValueSource.matches("runLongTests", "true")); @@ -287,10 +281,7 @@ public class DefaultValueOperationsTests { assertNotNull(((DefaultValueOperations) valueOps).deserializeKey((byte[]) key1)); } - /** - * @see DATAREDIS-197 - */ - @Test + @Test // DATAREDIS-197 public void testSetAndGetBit() { assumeTrue(redisTemplate instanceof StringRedisTemplate); diff --git a/src/test/java/org/springframework/data/redis/core/DefaultZSetOperationsTests.java b/src/test/java/org/springframework/data/redis/core/DefaultZSetOperationsTests.java index 31d6186a3..78cdac62c 100644 --- a/src/test/java/org/springframework/data/redis/core/DefaultZSetOperationsTests.java +++ b/src/test/java/org/springframework/data/redis/core/DefaultZSetOperationsTests.java @@ -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 { assertThat(tuple, isEqual(new DefaultTypedTuple(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 { 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 { 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 { 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 { assertThat(zSetOps.size(key), equalTo(3L)); } - /** - * @see DATAREDIS-306 - */ - @Test + @Test // DATAREDIS-306 @IfProfileValue(name = "redisVersion", value = "2.8+") public void testZScanShouldReadEntireValueRange() throws IOException { diff --git a/src/test/java/org/springframework/data/redis/core/IndexWriterUnitTests.java b/src/test/java/org/springframework/data/redis/core/IndexWriterUnitTests.java index 4d96b1a77..828bd3fb1 100644 --- a/src/test/java/org/springframework/data/redis/core/IndexWriterUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/IndexWriterUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/core/MultithreadedRedisTemplateTests.java b/src/test/java/org/springframework/data/redis/core/MultithreadedRedisTemplateTests.java index 3bf07faa6..73ddd4eac 100644 --- a/src/test/java/org/springframework/data/redis/core/MultithreadedRedisTemplateTests.java +++ b/src/test/java/org/springframework/data/redis/core/MultithreadedRedisTemplateTests.java @@ -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. @@ -69,10 +69,7 @@ public class MultithreadedRedisTemplateTests { return Arrays.asList(new Object[][] { { jedis }, { lettuce } }); } - /** - * @see DATAREDIS-300 - */ - @Test + @Test // DATAREDIS-300 public void assertResouresAreReleasedProperlyWhenSharingRedisTemplate() throws InterruptedException { final RedisTemplate template = new RedisTemplate(); diff --git a/src/test/java/org/springframework/data/redis/core/RedisCommandUnitTests.java b/src/test/java/org/springframework/data/redis/core/RedisCommandUnitTests.java index a67d5ac7a..b6afad4d6 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisCommandUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisCommandUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterTests.java b/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterTests.java index 45c0490c8..54a921e6b 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterTests.java @@ -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 map = new LinkedHashMap(); @@ -195,10 +180,7 @@ public class RedisKeyValueAdapterTests { assertThat(((Person) loaded).age, is(24)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void getShouldReadNestedObjectCorrectly() { Map map = new LinkedHashMap(); @@ -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 map = new LinkedHashMap(); @@ -228,10 +207,7 @@ public class RedisKeyValueAdapterTests { assertThat(adapter.count("persons"), is(3L)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void deleteRemovesEntriesCorrectly() { Map map = new LinkedHashMap(); @@ -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 map = new LinkedHashMap(); @@ -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 map = new LinkedHashMap(); @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterUnitTests.java b/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterUnitTests.java index 8bdfbfe18..6d48310b6 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisKeyValueAdapterUnitTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/core/RedisKeyValueTemplateTests.java b/src/test/java/org/springframework/data/redis/core/RedisKeyValueTemplateTests.java index 897de3fac..69cd30d3e 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisKeyValueTemplateTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisKeyValueTemplateTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/core/RedisTemplateTests.java b/src/test/java/org/springframework/data/redis/core/RedisTemplateTests.java index 9033632fe..9d6ee3365 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisTemplateTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisTemplateTests.java @@ -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. @@ -326,10 +326,7 @@ public class RedisTemplateTests { 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); @@ -512,20 +509,14 @@ public class RedisTemplateTests { 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(); @@ -534,10 +525,7 @@ public class RedisTemplateTests { assertTrue(expire < 0L); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void testGetExpireMillisForKeyDoesNotExist() { Long expire = redisTemplate.getExpire(keyFactory.instance(), TimeUnit.MILLISECONDS); @@ -545,10 +533,7 @@ public class RedisTemplateTests { assertTrue(expire < 0L); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void testGetExpireMillisForKeyExistButHasNoAssociatedExpire() { K key = keyFactory.instance(); @@ -559,10 +544,7 @@ public class RedisTemplateTests { assertTrue(expire < 0L); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 public void testGetExpireMillis() { assumeTrue(redisTemplate.getConnectionFactory() instanceof JedisConnectionFactory @@ -578,10 +560,7 @@ public class RedisTemplateTests { assertThat(ttl, lessThan(25L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 @SuppressWarnings({ "unchecked", "rawtypes" }) public void testGetExpireMillisUsingTransactions() { @@ -608,10 +587,7 @@ public class RedisTemplateTests { assertThat(((Long) result.get(1)), lessThan(25L)); } - /** - * @see DATAREDIS-526 - */ - @Test + @Test // DATAREDIS-526 @SuppressWarnings({ "unchecked", "rawtypes" }) public void testGetExpireMillisUsingPipelining() { @@ -739,10 +715,7 @@ public class RedisTemplateTests { 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(); @@ -818,10 +791,7 @@ public class RedisTemplateTests { assertThat(redisTemplate.opsForValue().get(key1), isEqual(value3)); } - /** - * @see DATAREDIS-506 - */ - @Test + @Test // DATAREDIS-506 public void testWatchMultipleKeys() { final K key1 = keyFactory.instance(); diff --git a/src/test/java/org/springframework/data/redis/core/RedisTemplateUnitTests.java b/src/test/java/org/springframework/data/redis/core/RedisTemplateUnitTests.java index f28035676..ef5450a8e 100644 --- a/src/test/java/org/springframework/data/redis/core/RedisTemplateUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/RedisTemplateUnitTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/core/ScanCursorUnitTests.java b/src/test/java/org/springframework/data/redis/core/ScanCursorUnitTests.java index b94a88f38..f6051307c 100644 --- a/src/test/java/org/springframework/data/redis/core/ScanCursorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/ScanCursorUnitTests.java @@ -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>()); assertThat(cursor.hasNext(), is(false)); } - /** - * @see DATAREDIS-290 - */ - @Test(expected = NoSuchElementException.class) + @Test(expected = NoSuchElementException.class) // DATAREDIS-290 public void cursorShouldReturnNullWhenNoNextElementAvailable() { initCursor(new LinkedList>()).next(); } - /** - * @see DATAREDIS-290 - */ - @Test + @Test // DATAREDIS-290 public void cursorShouldNotLoopWhenReachingStartingPointInFistLoop() { LinkedList> values = new LinkedList>(); @@ -82,10 +73,7 @@ public class ScanCursorUnitTests { assertThat(cursor.hasNext(), is(false)); } - /** - * @see DATAREDIS-290 - */ - @Test + @Test // DATAREDIS-290 public void cursorShouldStopLoopWhenReachingStartingPoint() { LinkedList> values = new LinkedList>(); @@ -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> values = new LinkedList>(); @@ -146,10 +128,7 @@ public class ScanCursorUnitTests { cursor.open(); } - /** - * @see DATAREDIS-290 - */ - @Test + @Test // DATAREDIS-290 public void positionShouldBeIncrementedCorrectly() throws IOException { LinkedList> values = new LinkedList>(); @@ -167,10 +146,7 @@ public class ScanCursorUnitTests { assertThat(cursor.getPosition(), is(2L)); } - /** - * @see DATAREDIS-417 - */ - @Test + @Test // DATAREDIS-417 public void hasNextShouldCallScanUntilFinishedWhenScanResultIsAnEmptyCollection() { LinkedList> values = new LinkedList>(); @@ -191,10 +167,7 @@ public class ScanCursorUnitTests { assertThat(result, hasItems("spring", "redis")); } - /** - * @see DATAREDIS-417 - */ - @Test + @Test // DATAREDIS-417 public void hasNextShouldStopWhenScanResultIsAnEmptyCollectionAndStateIsFinished() { LinkedList> values = new LinkedList>(); @@ -217,10 +190,7 @@ public class ScanCursorUnitTests { assertThat(result, hasItems("spring", "data")); } - /** - * @see DATAREDIS-417 - */ - @Test + @Test // DATAREDIS-417 public void hasNextShouldStopCorrectlyWhenWholeScanIterationDoesNotReturnResultsAndStateIsFinished() { LinkedList> values = new LinkedList>(); diff --git a/src/test/java/org/springframework/data/redis/core/convert/CompositeIndexResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/CompositeIndexResolverUnitTests.java index acea3e774..5fcbfa371 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/CompositeIndexResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/CompositeIndexResolverUnitTests.java @@ -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( diff --git a/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java index 178a37e2d..2d30c29a2 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java @@ -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. @@ -98,18 +98,12 @@ public class MappingRedisConverterUnitTests { rand = new Person(); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsTypeHintForRootCorrectly() { assertThat(write(rand).getBucket(), isBucket().containingTypeHint("_class", Person.class)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsKeyCorrectly() { rand.id = "1"; @@ -117,10 +111,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getId(), is((Serializable) "1")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsKeyCorrectlyWhenThereIsAnAdditionalIdFieldInNestedElement() { AddressWithId address = new AddressWithId(); @@ -136,10 +127,7 @@ public class MappingRedisConverterUnitTests { assertThat(data.getBucket(), isBucket().containingUtf8String("address.id", "tear")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeDoesNotAppendPropertiesWithNullValues() { rand.firstname = "rand"; @@ -147,10 +135,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().without("lastname")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeDoesNotAppendPropertiesWithEmptyCollections() { rand.firstname = "rand"; @@ -158,10 +143,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().without("nicknames")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsSimpleRootPropertyCorrectly() { rand.firstname = "nynaeve"; @@ -169,10 +151,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("firstname", "nynaeve")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsListOfSimplePropertiesCorrectly() { rand.nicknames = Arrays.asList("dragon reborn", "lews therin"); @@ -183,10 +162,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("nicknames.[1]", "lews therin")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsComplexObjectCorrectly() { Address address = new Address(); @@ -200,10 +176,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("address.country", "andora")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsListOfComplexObjectsCorrectly() { Person mat = new Person(); @@ -228,10 +201,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("coworkers.[1].address.city", "two rivers")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeDoesNotAddClassTypeInformationCorrectlyForMatchingTypes() { Address address = new Address(); @@ -244,10 +214,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.getBucket(), isBucket().without("address._class")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAddsClassTypeInformationCorrectlyForNonMatchingTypes() { AddressWithPostcode address = new AddressWithPostcode(); @@ -261,10 +228,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.getBucket(), isBucket().containingTypeHint("address._class", AddressWithPostcode.class)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readConsidersClassTypeInformationCorrectlyForNonMatchingTypes() { Map map = new HashMap(); @@ -276,10 +240,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.address, instanceOf(AddressWithPostcode.class)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAddsClassTypeInformationCorrectlyForNonMatchingTypesInCollections() { Person mat = new TaVeren(); @@ -292,10 +253,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.getBucket(), isBucket().containingTypeHint("coworkers.[0]._class", TaVeren.class)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readConvertsSimplePropertiesCorrectly() { RedisData rdo = new RedisData(Bucket.newBucketFromStringMap(Collections.singletonMap("firstname", "rand"))); @@ -303,10 +261,7 @@ public class MappingRedisConverterUnitTests { assertThat(converter.read(Person.class, rdo).firstname, is("rand")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readConvertsListOfSimplePropertiesCorrectly() { Map map = new LinkedHashMap(); @@ -317,10 +272,7 @@ public class MappingRedisConverterUnitTests { assertThat(converter.read(Person.class, rdo).nicknames, contains("dragon reborn", "lews therin")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readConvertsUnorderedListOfSimplePropertiesCorrectly() { Map map = new LinkedHashMap(); @@ -332,10 +284,7 @@ public class MappingRedisConverterUnitTests { assertThat(converter.read(Person.class, rdo).nicknames, contains("dragon reborn", "car'a'carn", "lews therin")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readComplexPropertyCorrectly() { Map map = new LinkedHashMap(); @@ -350,10 +299,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.address.country, is("andor")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readListComplexPropertyCorrectly() { Map map = new LinkedHashMap(); @@ -376,10 +322,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.coworkers.get(1).address.city, is("two rivers")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readUnorderedListOfComplexPropertyCorrectly() { Map map = new LinkedHashMap(); @@ -403,10 +346,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.coworkers.get(1).address.city, is("two rivers")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readListComplexPropertyCorrectlyAndConsidersClassTypeInformation() { Map map = new LinkedHashMap(); @@ -422,10 +362,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.coworkers.get(0).firstname, is("mat")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsMapWithSimpleKeyCorrectly() { Map map = new LinkedHashMap(); @@ -440,10 +377,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("physicalAttributes.[eye-color]", "grey")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsMapWithSimpleKeyOnNestedObjectCorrectly() { Map map = new LinkedHashMap(); @@ -461,10 +395,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("coworkers.[0].physicalAttributes.[eye-color]", "grey")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readSimpleMapValuesCorrectly() { Map map = new LinkedHashMap(); @@ -480,10 +411,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.physicalAttributes.get("eye-color"), is("grey")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsMapWithComplexObjectsCorrectly() { Map map = new LinkedHashMap(); @@ -502,10 +430,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("relatives.[step-father].firstname", "tam")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readMapWithComplexObjectsCorrectly() { Map map = new LinkedHashMap(); @@ -521,10 +446,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.relatives.get("step-father").firstname, is("tam")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeAppendsClassTypeInformationCorrectlyForMapWithComplexObjects() { Map map = new LinkedHashMap(); @@ -540,10 +462,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingTypeHint("relatives.[previous-incarnation]._class", TaVeren.class)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readConsidersClassTypeInformationCorrectlyForMapWithComplexObjects() { Map map = new LinkedHashMap(); @@ -557,10 +476,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.relatives.get("previous-incarnation").firstname, is("lews")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesIntegerValuesCorrectly() { rand.age = 20; @@ -568,10 +484,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("age", "20")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesLocalDateTimeValuesCorrectly() { rand.localDateTime = LocalDateTime.parse("2016-02-19T10:18:01"); @@ -579,10 +492,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("localDateTime", "2016-02-19T10:18:01")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsLocalDateTimeValuesCorrectly() { Person target = converter.read(Person.class, @@ -591,10 +501,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.localDateTime, is(LocalDateTime.parse("2016-02-19T10:18:01"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesLocalDateValuesCorrectly() { rand.localDate = LocalDate.parse("2016-02-19"); @@ -602,10 +509,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("localDate", "2016-02-19")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsLocalDateValuesCorrectly() { Person target = converter.read(Person.class, @@ -614,10 +518,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.localDate, is(LocalDate.parse("2016-02-19"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesLocalTimeValuesCorrectly() { rand.localTime = LocalTime.parse("11:12:13"); @@ -625,10 +526,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("localTime", "11:12:13")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsLocalTimeValuesCorrectly() { Person target = converter.read(Person.class, @@ -637,10 +535,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.localTime, is(LocalTime.parse("11:12:00"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesZonedDateTimeValuesCorrectly() { rand.zonedDateTime = ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"); @@ -649,10 +544,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("zonedDateTime", "2007-12-03T10:15:30+01:00[Europe/Paris]")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsZonedDateTimeValuesCorrectly() { Person target = converter.read(Person.class, new RedisData(Bucket @@ -661,10 +553,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.zonedDateTime, is(ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesInstantValuesCorrectly() { rand.instant = Instant.parse("2007-12-03T10:15:30.01Z"); @@ -672,10 +561,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("instant", "2007-12-03T10:15:30.010Z")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsInstantValuesCorrectly() { Person target = converter.read(Person.class, @@ -684,10 +570,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.instant, is(Instant.parse("2007-12-03T10:15:30.01Z"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesZoneIdValuesCorrectly() { rand.zoneId = ZoneId.of("Europe/Paris"); @@ -695,10 +578,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("zoneId", "Europe/Paris")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsZoneIdValuesCorrectly() { Person target = converter.read(Person.class, @@ -707,10 +587,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.zoneId, is(ZoneId.of("Europe/Paris"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesDurationValuesCorrectly() { rand.duration = Duration.parse("P2DT3H4M"); @@ -718,10 +595,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("duration", "PT51H4M")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsDurationValuesCorrectly() { Person target = converter.read(Person.class, @@ -730,10 +604,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.duration, is(Duration.parse("P2DT3H4M"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesPeriodValuesCorrectly() { rand.period = Period.parse("P1Y2M25D"); @@ -741,10 +612,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("period", "P1Y2M25D")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsPeriodValuesCorrectly() { Person target = converter.read(Person.class, @@ -753,10 +621,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.period, is(Period.parse("P1Y2M25D"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesEnumValuesCorrectly() { rand.gender = Gender.MALE; @@ -764,10 +629,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("gender", "MALE")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsEnumValuesCorrectly() { Person target = converter.read(Person.class, @@ -776,10 +638,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.gender, is(Gender.MALE)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesBooleanValuesCorrectly() { rand.alive = Boolean.TRUE; @@ -787,10 +646,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("alive", "1")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsBooleanValuesCorrectly() { Person target = converter.read(Person.class, @@ -799,10 +655,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.alive, is(Boolean.TRUE)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsStringBooleanValuesCorrectly() { Person target = converter.read(Person.class, @@ -811,10 +664,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.alive, is(Boolean.TRUE)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writesDateValuesCorrectly() { Calendar cal = Calendar.getInstance(); @@ -825,10 +675,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingDateAsMsec("birthdate", rand.birthdate)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readsDateValuesCorrectly() { Calendar cal = Calendar.getInstance(); @@ -842,10 +689,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.birthdate, is(date)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeSingleReferenceOnRootCorrectly() { Location location = new Location(); @@ -862,10 +706,7 @@ public class MappingRedisConverterUnitTests { .without("location.name")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readLoadsReferenceDataOnRootCorrectly() { Location location = new Location(); @@ -887,10 +728,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.location, is(location)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeSingleReferenceOnNestedElementCorrectly() { Location location = new Location(); @@ -910,10 +748,7 @@ public class MappingRedisConverterUnitTests { .without("coworkers.[0].location.name")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readLoadsReferenceDataOnNestedElementCorrectly() { Location location = new Location(); @@ -935,10 +770,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.coworkers.get(0).location, is(location)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeListOfReferencesOnRootCorrectly() { Location tarValon = new Location(); @@ -963,10 +795,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("visited.[2]", "locations:3")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readLoadsListOfReferencesOnRootCorrectly() { Location tarValon = new Location(); @@ -1014,10 +843,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.visited.get(2), is(tear)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeSetsAnnotatedTimeToLiveCorrectly() { ExpiringPerson birgitte = new ExpiringPerson(); @@ -1027,10 +853,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(birgitte).getTimeToLive(), is(5L)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeDoesNotTTLWhenNotPresent() { Location tear = new Location(); @@ -1040,10 +863,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(tear).getTimeToLive(), nullValue()); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldConsiderKeyspaceConfiguration() { this.converter.getMappingContext().getMappingConfiguration().getKeyspaceConfiguration() @@ -1055,10 +875,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(address).getKeyspace(), is("o_O")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldConsiderTimeToLiveConfiguration() { KeyspaceSettings assignment = new KeyspaceSettings(Address.class, "o_O"); @@ -1073,10 +890,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(address).getTimeToLive(), is(5L)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldHonorCustomConversionOnRootType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1092,10 +906,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("_raw", "{\"city\":\"unknown\",\"country\":\"Tel'aran'rhiod\"}")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldHonorCustomConversionOnNestedType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1112,10 +923,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("address", "{\"city\":\"unknown\",\"country\":\"Tel'aran'rhiod\"}")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldHonorIndexOnCustomConversionForNestedType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1131,10 +939,7 @@ public class MappingRedisConverterUnitTests { hasItem(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "address.country", "andor"))); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldHonorIndexAnnotationsOnWhenCustomConversionOnNestedype() { this.converter = new MappingRedisConverter(new RedisMappingContext(), null, resolverMock); @@ -1150,10 +955,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getIndexedData().isEmpty(), is(false)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readShouldHonorCustomConversionOnRootType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1170,10 +972,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.country, is("Tel'aran'rhiod")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readShouldHonorCustomConversionOnNestedType() { this.converter = new MappingRedisConverter(new RedisMappingContext(), null, resolverMock); @@ -1191,10 +990,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.address.country, is("Tel'aran'rhiod")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldPickUpTimeToLiveFromPropertyIfPresent() { ExipringPersonWithExplicitProperty aviendha = new ExipringPersonWithExplicitProperty(); @@ -1204,10 +1000,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(aviendha).getTimeToLive(), is(120L)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldUseDefaultTimeToLiveIfPropertyIsPresentButNull() { ExipringPersonWithExplicitProperty aviendha = new ExipringPersonWithExplicitProperty(); @@ -1216,10 +1009,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(aviendha).getTimeToLive(), is(5L)); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldConsiderMapConvertersForRootType() { this.converter = new MappingRedisConverter(new RedisMappingContext(), null, resolverMock); @@ -1234,10 +1024,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("species-nicknames", "halfmen,fades,neverborn")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldConsiderMapConvertersForNestedType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1250,10 +1037,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(rand).getBucket(), isBucket().containingUtf8String("species.species-name", "human")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readShouldConsiderMapConvertersForRootType() { this.converter = new MappingRedisConverter(new RedisMappingContext(), null, resolverMock); @@ -1268,10 +1052,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.name, is("trolloc")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readShouldConsiderMapConvertersForNestedType() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1287,10 +1068,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.species.name, is("trolloc")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void writeShouldConsiderMapConvertersInsideLists() { this.converter = new MappingRedisConverter(new RedisMappingContext(), null, resolverMock); @@ -1309,10 +1087,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("species.[0].species-nicknames", "halfmen,fades,neverborn")); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void readShouldConsiderMapConvertersForValuesInList() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1330,10 +1105,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.species.get(0).name, is("trolloc")); } - /** - * @see DATAREDIS-492 - */ - @Test + @Test // DATAREDIS-492 public void writeHandlesArraysProperly() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1350,10 +1122,7 @@ public class MappingRedisConverterUnitTests { RedisData target = write(map); } - /** - * @see DATAREDIS-492 - */ - @Test + @Test // DATAREDIS-492 public void writeHandlesArraysOfSimpleTypeProperly() { WithArrays source = new WithArrays(); @@ -1365,10 +1134,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("arrayOfSimpleTypes.[2]", "perrin")); } - /** - * @see DATAREDIS-492 - */ - @Test + @Test // DATAREDIS-492 public void readHandlesArraysOfSimpleTypeProperly() { Map source = new LinkedHashMap(); @@ -1381,10 +1147,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.arrayOfSimpleTypes, IsEqual.equalTo(new String[] { "rand", "mat", "perrin" })); } - /** - * @see DATAREDIS-492 - */ - @Test + @Test // DATAREDIS-492 public void writeHandlesArraysOfComplexTypeProperly() { WithArrays source = new WithArrays(); @@ -1406,10 +1169,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("arrayOfCompexTypes.[1].alsoKnownAs.[2]", "neverborn")); } - /** - * @see DATAREDIS-492 - */ - @Test + @Test // DATAREDIS-492 public void readHandlesArraysOfComplexTypeProperly() { Map source = new LinkedHashMap(); @@ -1428,10 +1188,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.arrayOfCompexTypes[1].alsoKnownAs, contains("halfmen", "fades", "neverborn")); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void writeHandlesArraysOfObjectTypeProperly() { Species trolloc = new Species(); @@ -1449,10 +1206,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("arrayOfObject.[2]", "100")); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void readHandlesArraysOfObjectTypeProperly() { Map source = new LinkedHashMap(); @@ -1473,10 +1227,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.arrayOfObject[2], instanceOf(Long.class)); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void writeShouldAppendTyeHintToObjectPropertyValueTypesCorrectly() { TypeWithObjectValueTypes sample = new TypeWithObjectValueTypes(); @@ -1488,10 +1239,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("object", "bar").containingUtf8String("object._class", "java.lang.String")); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void shouldWriteReadObjectPropertyValueTypeCorrectly() { TypeWithObjectValueTypes di = new TypeWithObjectValueTypes(); @@ -1503,10 +1251,7 @@ public class MappingRedisConverterUnitTests { assertThat(result.object, instanceOf(String.class)); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void writeShouldAppendTyeHintToObjectMapValueTypesCorrectly() { TypeWithObjectValueTypes sample = new TypeWithObjectValueTypes(); @@ -1523,10 +1268,7 @@ public class MappingRedisConverterUnitTests { assertThat(bucket, isBucket().containingUtf8String("map.[date]._class", "java.util.Date")); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void shouldWriteReadObjectMapValueTypeCorrectly() { TypeWithObjectValueTypes sample = new TypeWithObjectValueTypes(); @@ -1542,10 +1284,7 @@ public class MappingRedisConverterUnitTests { assertThat(result.map.get("date"), instanceOf(Date.class)); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void writeShouldAppendTyeHintToObjectListValueTypesCorrectly() { TypeWithObjectValueTypes sample = new TypeWithObjectValueTypes(); @@ -1562,10 +1301,7 @@ public class MappingRedisConverterUnitTests { assertThat(bucket, isBucket().containingUtf8String("list.[2]._class", "java.util.Date")); } - /** - * @see DATAREDIS-489 - */ - @Test + @Test // DATAREDIS-489 public void shouldWriteReadObjectListValueTypeCorrectly() { TypeWithObjectValueTypes sample = new TypeWithObjectValueTypes(); @@ -1581,11 +1317,7 @@ public class MappingRedisConverterUnitTests { assertThat(result.list.get(2), instanceOf(Date.class)); } - /** - * - * @see DATAREDIS-509 - */ - @Test + @Test // DATAREDIS-509 public void writeHandlesArraysOfPrimitivesProperly() { Map source = new LinkedHashMap(); @@ -1600,10 +1332,7 @@ public class MappingRedisConverterUnitTests { assertThat(target.arrayOfPrimitives[2], is(3)); } - /** - * @see DATAREDIS-509 - */ - @Test + @Test // DATAREDIS-509 public void readHandlesArraysOfPrimitivesProperly() { WithArrays source = new WithArrays(); @@ -1612,10 +1341,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("arrayOfPrimitives.[1]", "2").containingUtf8String("arrayOfPrimitives.[2]", "3")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldNotAppendClassTypeHint() { Person value = new Person(); @@ -1627,10 +1353,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket().get("_class"), is(nullValue())); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdateSimpleValueCorrectly() { Person value = new Person(); @@ -1643,10 +1366,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("firstname", "rand").containingUtf8String("age", "24")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleValueCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("firstname", "rand").set("age", @@ -1656,10 +1376,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("firstname", "rand").containingUtf8String("age", "24")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdateNestedPathWithSimpleValueCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("address.city", "two rivers"); @@ -1667,10 +1384,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("address.city", "two rivers")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexValueCorrectly() { Address address = new Address(); @@ -1683,10 +1397,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("address.city", "two rivers").containingUtf8String("address.country", "andor")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleListValueCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("nicknames", @@ -1696,10 +1407,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("nicknames.[0]", "dragon").containingUtf8String("nicknames.[1]", "lews")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexListValueCorrectly() { Person mat = new Person(); @@ -1716,10 +1424,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("coworkers.[0].age", "24").containingUtf8String("coworkers.[1].firstname", "perrin")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleListValueWhenNotPassedInAsCollectionCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("nicknames", "dragon"); @@ -1727,10 +1432,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("nicknames.[0]", "dragon")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexListValueWhenNotPassedInAsCollectionCorrectly() { Person mat = new Person(); @@ -1743,10 +1445,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("coworkers.[0].age", "24")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleListValueWhenNotPassedInAsCollectionWithPositionalParameterCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("nicknames.[5]", "dragon"); @@ -1754,10 +1453,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("nicknames.[5]", "dragon")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexListValueWhenNotPassedInAsCollectionWithPositionalParameterCorrectly() { Person mat = new Person(); @@ -1770,10 +1466,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("coworkers.[5].age", "24")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleMapValueCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("physicalAttributes", @@ -1782,10 +1475,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("physicalAttributes.[eye-color]", "grey")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexMapValueCorrectly() { Person tam = new Person(); @@ -1799,10 +1489,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("relatives.[father].alive", "0")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleMapValueWhenNotPassedInAsCollectionCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("physicalAttributes", @@ -1811,10 +1498,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("physicalAttributes.[eye-color]", "grey")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithComplexMapValueWhenNotPassedInAsCollectionCorrectly() { Person tam = new Person(); @@ -1828,10 +1512,7 @@ public class MappingRedisConverterUnitTests { .containingUtf8String("relatives.[father].alive", "0")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleMapValueWhenNotPassedInAsCollectionWithPositionalParameterCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("physicalAttributes.[eye-color]", @@ -1840,10 +1521,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("physicalAttributes.[eye-color]", "grey")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithSimpleMapValueOnNestedElementCorrectly() { PartialUpdate update = new PartialUpdate("123", Person.class).set("relatives.[father].firstname", @@ -1852,10 +1530,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket(), isBucket().containingUtf8String("relatives.[father].firstname", "tam")); } - /** - * @see DATAREDIS-471 - */ - @Test(expected = MappingException.class) + @Test(expected = MappingException.class) // DATAREDIS-471 public void writeShouldThrowExceptionOnPartialUpdatePathWithSimpleMapValueWhenItsASingleValueWithoutPath() { PartialUpdate update = new PartialUpdate("123", Person.class).set("physicalAttributes", "grey"); @@ -1863,10 +1538,7 @@ public class MappingRedisConverterUnitTests { write(update); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithRegisteredCustomConversionCorrectly() { this.converter = new MappingRedisConverter(null, null, resolverMock); @@ -1884,10 +1556,7 @@ public class MappingRedisConverterUnitTests { isBucket().containingUtf8String("address", "{\"city\":\"unknown\",\"country\":\"Tel'aran'rhiod\"}")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithReferenceCorrectly() { Location tar = new Location(); @@ -1907,10 +1576,7 @@ public class MappingRedisConverterUnitTests { .without("visited.name")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldWritePartialUpdatePathWithListOfReferencesCorrectly() { Location location = new Location(); @@ -1926,10 +1592,7 @@ public class MappingRedisConverterUnitTests { .without("location.name")); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldThrowExceptionForUpdateValueNotAssignableToDomainTypeProperty() { exception.expect(MappingException.class); @@ -1943,10 +1606,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket().get("_class"), is(nullValue())); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldThrowExceptionForUpdateCollectionValueNotAssignableToDomainTypeProperty() { exception.expect(MappingException.class); @@ -1960,10 +1620,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket().get("_class"), is(nullValue())); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldThrowExceptionForUpdateValueInCollectionNotAssignableToDomainTypeProperty() { exception.expect(MappingException.class); @@ -1977,10 +1634,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket().get("_class"), is(nullValue())); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldThrowExceptionForUpdateMapValueNotAssignableToDomainTypeProperty() { exception.expect(MappingException.class); @@ -1994,10 +1648,7 @@ public class MappingRedisConverterUnitTests { assertThat(write(update).getBucket().get("_class"), is(nullValue())); } - /** - * @see DATAREDIS-471 - */ - @Test + @Test // DATAREDIS-471 public void writeShouldThrowExceptionForUpdateValueInMapNotAssignableToDomainTypeProperty() { exception.expect(MappingException.class); diff --git a/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java index 778715a5e..c07765d7b 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java index 5ce91e385..3d3230565 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java @@ -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 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 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)"); diff --git a/src/test/java/org/springframework/data/redis/core/index/IndexConfigurationUnitTests.java b/src/test/java/org/springframework/data/redis/core/index/IndexConfigurationUnitTests.java index 7c873e8a4..c2b481d59 100644 --- a/src/test/java/org/springframework/data/redis/core/index/IndexConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/index/IndexConfigurationUnitTests.java @@ -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"); diff --git a/src/test/java/org/springframework/data/redis/core/mapping/BasicRedisPersistentEntityUnitTests.java b/src/test/java/org/springframework/data/redis/core/mapping/BasicRedisPersistentEntityUnitTests.java index 5fa8fb6a6..5c060234d 100644 --- a/src/test/java/org/springframework/data/redis/core/mapping/BasicRedisPersistentEntityUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/mapping/BasicRedisPersistentEntityUnitTests.java @@ -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 { entity = new BasicRedisPersistentEntity(entityInformation, keySpaceResolver, ttlAccessor); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 public void addingMultipleIdPropertiesWithoutAnExplicitOneThrowsException() { expectedException.expect(MappingException.class); @@ -81,10 +78,7 @@ public class BasicRedisPersistentEntityUnitTests { entity.addPersistentProperty(property2); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 @SuppressWarnings("unchecked") public void addingMultipleExplicitIdPropertiesThrowsException() { @@ -104,10 +98,7 @@ public class BasicRedisPersistentEntityUnitTests { entity.addPersistentProperty(property2); } - /** - * @see DATAREDIS-425 - */ - @Test + @Test // DATAREDIS-425 @SuppressWarnings("unchecked") public void explicitIdPropertiyShouldBeFavoredOverNonExplicit() { diff --git a/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareKeySpaceResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareKeySpaceResolverUnitTests.java index a0aab535a..94a8a61cb 100644 --- a/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareKeySpaceResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareKeySpaceResolverUnitTests.java @@ -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")); diff --git a/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareTimeToLiveAccessorUnitTests.java b/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareTimeToLiveAccessorUnitTests.java index 321c193b2..24d83c344 100644 --- a/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareTimeToLiveAccessorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/mapping/ConfigAwareTimeToLiveAccessorUnitTests.java @@ -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("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("123", diff --git a/src/test/java/org/springframework/data/redis/core/script/AbstractDefaultScriptExecutorTests.java b/src/test/java/org/springframework/data/redis/core/script/AbstractDefaultScriptExecutorTests.java index 96002d716..b4b657e90 100644 --- a/src/test/java/org/springframework/data/redis/core/script/AbstractDefaultScriptExecutorTests.java +++ b/src/test/java/org/springframework/data/redis/core/script/AbstractDefaultScriptExecutorTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/core/script/DefaultScriptExecutorUnitTests.java b/src/test/java/org/springframework/data/redis/core/script/DefaultScriptExecutorUnitTests.java index ca5c66656..a98343bc2 100644 --- a/src/test/java/org/springframework/data/redis/core/script/DefaultScriptExecutorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/script/DefaultScriptExecutorUnitTests.java @@ -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(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( diff --git a/src/test/java/org/springframework/data/redis/core/types/ExpirationUnitTests.java b/src/test/java/org/springframework/data/redis/core/types/ExpirationUnitTests.java index 590d0ecec..772fff731 100644 --- a/src/test/java/org/springframework/data/redis/core/types/ExpirationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/types/ExpirationUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerTests.java b/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerTests.java index fc3a2d1cf..b54183915 100644 --- a/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerTests.java +++ b/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerUnitTests.java b/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerUnitTests.java index eb5604af5..d944f1a4c 100644 --- a/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerUnitTests.java +++ b/src/test/java/org/springframework/data/redis/listener/KeyExpirationEventMessageListenerUnitTests.java @@ -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()); diff --git a/src/test/java/org/springframework/data/redis/listener/PubSubTests.java b/src/test/java/org/springframework/data/redis/listener/PubSubTests.java index 0ef1fd724..be0826dbe 100644 --- a/src/test/java/org/springframework/data/redis/listener/PubSubTests.java +++ b/src/test/java/org/springframework/data/redis/listener/PubSubTests.java @@ -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 { 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("*"))); diff --git a/src/test/java/org/springframework/data/redis/listener/RedisMessageListenerContainerTests.java b/src/test/java/org/springframework/data/redis/listener/RedisMessageListenerContainerTests.java index 62592c34a..e077edd28 100644 --- a/src/test/java/org/springframework/data/redis/listener/RedisMessageListenerContainerTests.java +++ b/src/test/java/org/springframework/data/redis/listener/RedisMessageListenerContainerTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/listener/SubscriptionConnectionTests.java b/src/test/java/org/springframework/data/redis/listener/SubscriptionConnectionTests.java index 944827722..ca9996d93 100644 --- a/src/test/java/org/springframework/data/redis/listener/SubscriptionConnectionTests.java +++ b/src/test/java/org/springframework/data/redis/listener/SubscriptionConnectionTests.java @@ -124,7 +124,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); } diff --git a/src/test/java/org/springframework/data/redis/listener/adapter/MessageListenerTest.java b/src/test/java/org/springframework/data/redis/listener/adapter/MessageListenerTest.java index 1427572a5..27017cf2b 100644 --- a/src/test/java/org/springframework/data/redis/listener/adapter/MessageListenerTest.java +++ b/src/test/java/org/springframework/data/redis/listener/adapter/MessageListenerTest.java @@ -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 { diff --git a/src/test/java/org/springframework/data/redis/mapping/AbstractHashMapperTest.java b/src/test/java/org/springframework/data/redis/mapping/AbstractHashMapperTest.java index 9474ea9cf..22a87da32 100644 --- a/src/test/java/org/springframework/data/redis/mapping/AbstractHashMapperTest.java +++ b/src/test/java/org/springframework/data/redis/mapping/AbstractHashMapperTest.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperTests.java b/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperTests.java index 79fa8132e..a9b88e866 100644 --- a/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperTests.java +++ b/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperUnitTests.java b/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperUnitTests.java index b652943a8..ba9630b95 100644 --- a/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperUnitTests.java +++ b/src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperUnitTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/mapping/ObjectHashMapperTests.java b/src/test/java/org/springframework/data/redis/mapping/ObjectHashMapperTests.java index da0cffceb..077ddd203 100644 --- a/src/test/java/org/springframework/data/redis/mapping/ObjectHashMapperTests.java +++ b/src/test/java/org/springframework/data/redis/mapping/ObjectHashMapperTests.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java b/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java index d075d919d..0a72ab7dc 100644 --- a/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java +++ b/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java @@ -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(); diff --git a/src/test/java/org/springframework/data/redis/repository/cdi/CdiExtensionIntegrationTests.java b/src/test/java/org/springframework/data/redis/repository/cdi/CdiExtensionIntegrationTests.java index 0e7a2b163..c5ac3cfb3 100644 --- a/src/test/java/org/springframework/data/redis/repository/cdi/CdiExtensionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/repository/cdi/CdiExtensionIntegrationTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationExtensionUnitTests.java b/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationExtensionUnitTests.java index fb02434e5..315d0d22d 100644 --- a/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationExtensionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationExtensionUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationUnitTests.java b/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationUnitTests.java index 6331713c6..37abcf836 100644 --- a/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/repository/configuration/RedisRepositoryConfigurationUnitTests.java @@ -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())); diff --git a/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java b/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java index 120b2c604..22b28d126 100644 --- a/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java +++ b/src/test/java/org/springframework/data/redis/repository/core/MappingRedisEntityInformationUnitTests.java @@ -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 @Mock RedisPersistentEntity entity; - /** - * @see DATAREDIS-425 - */ - @Test(expected = MappingException.class) + @Test(expected = MappingException.class) // DATAREDIS-425 @SuppressWarnings("unchecked") public void throwsMappingExceptionWhenNoIdPropertyPresent() { diff --git a/src/test/java/org/springframework/data/redis/repository/query/RedisQueryCreatorUnitTests.java b/src/test/java/org/springframework/data/redis/repository/query/RedisQueryCreatorUnitTests.java index 312ca0771..5c9717ee3 100644 --- a/src/test/java/org/springframework/data/redis/repository/query/RedisQueryCreatorUnitTests.java +++ b/src/test/java/org/springframework/data/redis/repository/query/RedisQueryCreatorUnitTests.java @@ -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); diff --git a/src/test/java/org/springframework/data/redis/serializer/GenericJackson2JsonRedisSerializerUnitTests.java b/src/test/java/org/springframework/data/redis/serializer/GenericJackson2JsonRedisSerializerUnitTests.java index c00b3f582..c4b39c274 100644 --- a/src/test/java/org/springframework/data/redis/serializer/GenericJackson2JsonRedisSerializerUnitTests.java +++ b/src/test/java/org/springframework/data/redis/serializer/GenericJackson2JsonRedisSerializerUnitTests.java @@ -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. @@ -47,72 +47,48 @@ public class GenericJackson2JsonRedisSerializerUnitTests { private static final SimpleObject SIMPLE_OBJECT = new SimpleObject(1L); private static final ComplexObject COMPLEX_OBJECT = new ComplexObject("steelheart", SIMPLE_OBJECT); - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void shouldUseDefaultTyping() { assertThat(extractTypeResolver(new GenericJackson2JsonRedisSerializer()), notNullValue()); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void shouldUseDefaultTypingWhenClassPropertyNameIsEmpty() { TypeResolverBuilder typeResolver = extractTypeResolver(new GenericJackson2JsonRedisSerializer("")); assertThat((String) getField(typeResolver, "_typeProperty"), is(JsonTypeInfo.Id.CLASS.getDefaultPropertyName())); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void shouldUseDefaultTypingWhenClassPropertyNameIsNull() { TypeResolverBuilder typeResolver = extractTypeResolver(new GenericJackson2JsonRedisSerializer((String) null)); assertThat((String) getField(typeResolver, "_typeProperty"), is(JsonTypeInfo.Id.CLASS.getDefaultPropertyName())); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void shouldUseDefaultTypingWhenClassPropertyNameIsProvided() { TypeResolverBuilder typeResolver = extractTypeResolver(new GenericJackson2JsonRedisSerializer("firefight")); assertThat((String) getField(typeResolver, "_typeProperty"), is("firefight")); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void serializeShouldReturnEmptyByteArrayWhenSouceIsNull() { assertThat(new GenericJackson2JsonRedisSerializer().serialize(null), is(SerializationUtils.EMPTY_ARRAY)); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void deserializeShouldReturnNullWhenSouceIsNull() { assertThat(new GenericJackson2JsonRedisSerializer().deserialize(null), nullValue()); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void deserializeShouldReturnNullWhenSouceIsEmptyArray() { assertThat(new GenericJackson2JsonRedisSerializer().deserialize(SerializationUtils.EMPTY_ARRAY), nullValue()); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void deserializeShouldBeAbleToRestoreSimpleObjectAfterSerialization() { GenericJackson2JsonRedisSerializer serializer = new GenericJackson2JsonRedisSerializer(); @@ -120,10 +96,7 @@ public class GenericJackson2JsonRedisSerializerUnitTests { assertThat((SimpleObject) serializer.deserialize(serializer.serialize(SIMPLE_OBJECT)), is(SIMPLE_OBJECT)); } - /** - * @see DATAREDIS-392 - */ - @Test + @Test // DATAREDIS-392 public void deserializeShouldBeAbleToRestoreComplexObjectAfterSerialization() { GenericJackson2JsonRedisSerializer serializer = new GenericJackson2JsonRedisSerializer(); @@ -131,10 +104,7 @@ public class GenericJackson2JsonRedisSerializerUnitTests { assertThat((ComplexObject) serializer.deserialize(serializer.serialize(COMPLEX_OBJECT)), is(COMPLEX_OBJECT)); } - /** - * @see DATAREDIS-392 - */ - @Test(expected = SerializationException.class) + @Test(expected = SerializationException.class) // DATAREDIS-392 public void serializeShouldThrowSerializationExceptionProcessingError() throws JsonProcessingException { ObjectMapper objectMapperMock = mock(ObjectMapper.class); @@ -143,10 +113,7 @@ public class GenericJackson2JsonRedisSerializerUnitTests { new GenericJackson2JsonRedisSerializer(objectMapperMock).serialize(SIMPLE_OBJECT); } - /** - * @see DATAREDIS-392 - */ - @Test(expected = SerializationException.class) + @Test(expected = SerializationException.class) // DATAREDIS-392 public void deserializeShouldThrowSerializationExceptionProcessingError() throws IOException { ObjectMapper objectMapperMock = mock(ObjectMapper.class); @@ -156,10 +123,7 @@ public class GenericJackson2JsonRedisSerializerUnitTests { new GenericJackson2JsonRedisSerializer(objectMapperMock).deserialize(new byte[] { 1 }); } - /** - * @see DATAREDIS-553 - */ - @Test + @Test // DATAREDIS-553 public void shouldSerializeNullValueSoThatItCanBeDeserializedWithDefaultTypingEnabled() { GenericJackson2JsonRedisSerializer serializer = new GenericJackson2JsonRedisSerializer(); diff --git a/src/test/java/org/springframework/data/redis/serializer/Jackson2JsonRedisSerializerTests.java b/src/test/java/org/springframework/data/redis/serializer/Jackson2JsonRedisSerializerTests.java index a2c3c339a..14e93fa7d 100644 --- a/src/test/java/org/springframework/data/redis/serializer/Jackson2JsonRedisSerializerTests.java +++ b/src/test/java/org/springframework/data/redis/serializer/Jackson2JsonRedisSerializerTests.java @@ -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,36 +39,24 @@ public class Jackson2JsonRedisSerializerTests { this.serializer = new Jackson2JsonRedisSerializer(Person.class); } - /** - * @see DATAREDIS-241 - */ - @Test + @Test // DATAREDIS-241 public void testJackson2JsonSerializer() throws Exception { Person person = new PersonObjectFactory().instance(); assertEquals(person, serializer.deserialize(serializer.serialize(person))); } - /** - * @see DATAREDIS-241 - */ - @Test + @Test // DATAREDIS-241 public void testJackson2JsonSerializerShouldReturnEmptyByteArrayWhenSerializingNull() { assertThat(serializer.serialize(null), Is.is(new byte[0])); } - /** - * @see DTATREDIS-241 - */ - @Test + @Test // DTATREDIS-241 public void testJackson2JsonSerializerShouldReturnNullWhenDerserializingEmtyByteArray() { assertThat(serializer.deserialize(new byte[0]), IsNull.nullValue()); } - /** - * @see DTATREDIS-241 - */ - @Test(expected = SerializationException.class) + @Test(expected = SerializationException.class) // DTATREDIS-241 public void testJackson2JsonSerilizerShouldThrowExceptionWhenDeserializingInvalidByteArray() { Person person = new PersonObjectFactory().instance(); @@ -78,10 +66,7 @@ public class Jackson2JsonRedisSerializerTests { serializer.deserialize(serializedValue); } - /** - * @see DTATREDIS-241 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DTATREDIS-241 public void testJackson2JsonSerilizerThrowsExceptionWhenSettingNullObjectMapper() { serializer.setObjectMapper(null); } diff --git a/src/test/java/org/springframework/data/redis/serializer/SimpleRedisSerializerTests.java b/src/test/java/org/springframework/data/redis/serializer/SimpleRedisSerializerTests.java index 01f9c669b..7a96ec627 100644 --- a/src/test/java/org/springframework/data/redis/serializer/SimpleRedisSerializerTests.java +++ b/src/test/java/org/springframework/data/redis/serializer/SimpleRedisSerializerTests.java @@ -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. @@ -122,10 +122,7 @@ public class SimpleRedisSerializerTests { } } - /** - * @see DATAREDIS-427 - */ - @Test + @Test // DATAREDIS-427 public void jdkSerializerShouldUseCustomClassLoader() throws ClassNotFoundException { ClassLoader customClassLoader = new ShadowingClassLoader(ClassLoader.getSystemClassLoader()); diff --git a/src/test/java/org/springframework/data/redis/support/BoundKeyOperationsTest.java b/src/test/java/org/springframework/data/redis/support/BoundKeyOperationsTest.java index 1e3690c7f..9c8c1c468 100644 --- a/src/test/java/org/springframework/data/redis/support/BoundKeyOperationsTest.java +++ b/src/test/java/org/springframework/data/redis/support/BoundKeyOperationsTest.java @@ -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. @@ -106,10 +106,7 @@ public class BoundKeyOperationsTest { assertEquals(key, keyOps.getKey()); } - /** - * @see DATAREDIS-251 - */ - @Test + @Test // DATAREDIS-251 public void testExpire() throws Exception { assertEquals(keyOps.getClass().getName() + " -> " + keyOps.getKey(), Long.valueOf(-1), keyOps.getExpire()); @@ -120,10 +117,7 @@ public class BoundKeyOperationsTest { } } - /** - * @see DATAREDIS-251 - */ - @Test + @Test // DATAREDIS-251 public void testPersist() throws Exception { keyOps.persist(); diff --git a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicDoubleTests.java b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicDoubleTests.java index 4b2fea776..f7fd10264 100644 --- a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicDoubleTests.java +++ b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicDoubleTests.java @@ -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. @@ -176,10 +176,7 @@ public class RedisAtomicDoubleTests extends AbstractRedisAtomicsTests { assertNull(factory.getConnection().get((getClass().getSimpleName() + ":double").getBytes())); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfRedisAtomicDoubleIsUsedWithRedisTemplateAndNoKeySerializer() { expectedException.expect(IllegalArgumentException.class); @@ -188,10 +185,7 @@ public class RedisAtomicDoubleTests extends AbstractRedisAtomicsTests { new RedisAtomicDouble("foo", new RedisTemplate()); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfRedisAtomicDoubleIsUsedWithRedisTemplateAndNoValueSerializer() { expectedException.expect(IllegalArgumentException.class); @@ -202,10 +196,7 @@ public class RedisAtomicDoubleTests extends AbstractRedisAtomicsTests { new RedisAtomicDouble("foo", template); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldBeAbleToUseRedisAtomicDoubleWithProperlyConfiguredRedisTemplate() { RedisAtomicDouble ral = new RedisAtomicDouble("DATAREDIS-317.atomicDouble", template); @@ -214,10 +205,7 @@ public class RedisAtomicDoubleTests extends AbstractRedisAtomicsTests { assertThat(ral.get(), is(32.23)); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getThrowsExceptionWhenKeyHasBeenRemoved() { expectedException.expect(DataRetrievalFailureException.class); @@ -232,10 +220,7 @@ public class RedisAtomicDoubleTests extends AbstractRedisAtomicsTests { test.get(); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getAndSetReturnsZeroWhenKeyHasBeenRemoved() { // setup double diff --git a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicIntegerTests.java b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicIntegerTests.java index 083d3a86b..8c442c710 100644 --- a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicIntegerTests.java +++ b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicIntegerTests.java @@ -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. @@ -112,10 +112,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertEquals(0, intCounter.decrementAndGet()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndIncrement() { intCounter.set(1); @@ -123,10 +120,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertEquals(2, intCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndAdd() { intCounter.set(1); @@ -134,10 +128,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertEquals(6, intCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndDecrement() { intCounter.set(1); @@ -145,10 +136,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertEquals(0, intCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndSet() { intCounter.set(1); @@ -189,10 +177,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertFalse("counter already modified", failed.get()); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfRedisAtomicIntegerIsUsedWithRedisTemplateAndNoKeySerializer() { expectedException.expect(IllegalArgumentException.class); @@ -201,10 +186,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { new RedisAtomicInteger("foo", new RedisTemplate()); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfRedisAtomicIntegerIsUsedWithRedisTemplateAndNoValueSerializer() { expectedException.expect(IllegalArgumentException.class); @@ -215,10 +197,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { new RedisAtomicInteger("foo", template); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldBeAbleToUseRedisAtomicIntegerWithProperlyConfiguredRedisTemplate() { RedisAtomicInteger ral = new RedisAtomicInteger("DATAREDIS-317.atomicInteger", template); @@ -227,10 +206,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { assertThat(ral.get(), is(32)); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getThrowsExceptionWhenKeyHasBeenRemoved() { expectedException.expect(DataRetrievalFailureException.class); @@ -245,10 +221,7 @@ public class RedisAtomicIntegerTests extends AbstractRedisAtomicsTests { test.get(); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getAndSetReturnsZeroWhenKeyHasBeenRemoved() { // setup integer diff --git a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicLongTests.java b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicLongTests.java index e3780a715..18684b51b 100644 --- a/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicLongTests.java +++ b/src/test/java/org/springframework/data/redis/support/atomic/RedisAtomicLongTests.java @@ -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. @@ -108,10 +108,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertEquals(0, longCounter.decrementAndGet()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndIncrement() { longCounter.set(1); @@ -119,10 +116,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertEquals(2, longCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndAdd() { longCounter.set(1); @@ -130,10 +124,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertEquals(6, longCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndDecrement() { longCounter.set(1); @@ -141,10 +132,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertEquals(0, longCounter.get()); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void testGetAndSet() { longCounter.set(1); @@ -160,10 +148,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertEquals(longCounter.get(), keyCopy.get()); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfAtomicLongIsUsedWithRedisTemplateAndNoKeySerializer() { expectedException.expect(IllegalArgumentException.class); @@ -173,10 +158,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { new RedisAtomicLong("foo", template); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldThrowExceptionIfAtomicLongIsUsedWithRedisTemplateAndNoValueSerializer() { expectedException.expect(IllegalArgumentException.class); @@ -187,10 +169,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { new RedisAtomicLong("foo", template); } - /** - * @see DATAREDIS-317 - */ - @Test + @Test // DATAREDIS-317 public void testShouldBeAbleToUseRedisAtomicLongWithProperlyConfiguredRedisTemplate() { RedisTemplate template = new RedisTemplate(); @@ -205,10 +184,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { assertThat(ral.get(), is(32L)); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getThrowsExceptionWhenKeyHasBeenRemoved() { expectedException.expect(DataRetrievalFailureException.class); @@ -223,10 +199,7 @@ public class RedisAtomicLongTests extends AbstractRedisAtomicsTests { test.get(); } - /** - * @see DATAREDIS-469 - */ - @Test + @Test // DATAREDIS-469 public void getAndSetReturnsZeroWhenKeyHasBeenRemoved() { // setup long diff --git a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisCollectionUnitTests.java b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisCollectionUnitTests.java index 664dcd654..a0e9add03 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisCollectionUnitTests.java +++ b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisCollectionUnitTests.java @@ -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. @@ -92,22 +92,16 @@ public class AbstractRedisCollectionUnitTests { when(connectionFactoryMock.getConnection()).thenReturn(connectionMock); } - /** - * @see DATAREDIS-188 - */ @SuppressWarnings("unchecked") - @Test + @Test // DATAREDIS-188 public void testRenameOfEmptyCollectionShouldNotTriggerRedisOperation() { collection.rename("new-key"); verify(redisTemplateSpy, never()).rename(eq("key"), eq("new-key")); } - /** - * @see DATAREDIS-188 - */ @SuppressWarnings("unchecked") - @Test + @Test // DATAREDIS-188 public void testRenameCollectionShouldTriggerRedisOperation() { when(redisTemplateSpy.hasKey(anyObject())).thenReturn(Boolean.TRUE); diff --git a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisMapTests.java b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisMapTests.java index af77f399d..0d7c1f7ce 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisMapTests.java +++ b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisMapTests.java @@ -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. @@ -486,10 +486,7 @@ public abstract class AbstractRedisMapTests { map.replace(getKey(), null); } - /** - * @see DATAREDIS-314 - */ - @Test + @Test // DATAREDIS-314 @IfProfileValue(name = "redisVersion", value = "2.8+") @WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE }) public void testScanWorksCorrectly() throws IOException { diff --git a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisSetTests.java b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisSetTests.java index b373cf8d1..9dfac9826 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisSetTests.java +++ b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisSetTests.java @@ -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. @@ -303,9 +303,7 @@ public abstract class AbstractRedisSetTests extends AbstractRedisCollectionTe assertEquals(0, result.size()); } - /** - * @see DATAREDIS-314 - */ + // DATAREDIS-314 @SuppressWarnings("unchecked") @IfProfileValue(name = "redisVersion", value = "2.8+") @Test diff --git a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisZSetTest.java b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisZSetTest.java index 30951cea7..8fef2f803 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisZSetTest.java +++ b/src/test/java/org/springframework/data/redis/support/collections/AbstractRedisZSetTest.java @@ -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. @@ -327,10 +327,7 @@ public abstract class AbstractRedisZSetTest extends AbstractRedisCollectionTe assertThat(tuple2.getScore(), isEqual(Double.valueOf(1))); } - /** - * @see DATAREDIS-407 - */ - @Test + @Test // DATAREDIS-407 public void testRangeByLexUnbounded() { assumeThat(factory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class), @@ -350,10 +347,7 @@ public abstract class AbstractRedisZSetTest extends AbstractRedisCollectionTe assertThat(tuple, isEqual(t1)); } - /** - * @see DATAREDIS-407 - */ - @Test + @Test // DATAREDIS-407 public void testRangeByLexBounded() { assumeThat(factory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class), @@ -373,10 +367,7 @@ public abstract class AbstractRedisZSetTest extends AbstractRedisCollectionTe assertThat(tuple, isEqual(t2)); } - /** - * @see DATAREDIS-407 - */ - @Test + @Test // DATAREDIS-407 public void testRangeByLexUnboundedWithLimit() { assumeThat(factory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class), @@ -397,10 +388,7 @@ public abstract class AbstractRedisZSetTest extends AbstractRedisCollectionTe assertThat(tuple, isEqual(t2)); } - /** - * @see DATAREDIS-407 - */ - @Test + @Test // DATAREDIS-407 public void testRangeByLexBoundedWithLimit() { assumeThat(factory, anyOf(instanceOf(DoubleObjectFactory.class), instanceOf(DoubleAsStringObjectFactory.class), @@ -632,11 +620,8 @@ public abstract class AbstractRedisZSetTest extends AbstractRedisCollectionTe assertArrayEquals(new Object[] { t1, t2, t3, t4 }, array); } - /** - * @see DATAREDIS-314 - */ @IfProfileValue(name = "redisVersion", value = "2.8+") - @Test + @Test // DATAREDIS-314 @WithRedisDriver({ RedisDriver.JEDIS, RedisDriver.LETTUCE }) public void testScanWorksCorrectly() throws IOException { diff --git a/src/test/java/org/springframework/data/redis/support/collections/RedisMapTests.java b/src/test/java/org/springframework/data/redis/support/collections/RedisMapTests.java index 7f8193224..790e99ede 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/RedisMapTests.java +++ b/src/test/java/org/springframework/data/redis/support/collections/RedisMapTests.java @@ -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. @@ -60,9 +60,7 @@ public class RedisMapTests extends AbstractRedisMapTests { return new DefaultRedisMap(redisName, template); } - /** - * @see DATAREDIS-241 - */ + // DATAREDIS-241 @SuppressWarnings("rawtypes") @Parameters public static Collection testParams() { diff --git a/src/test/java/org/springframework/data/redis/support/collections/RedisPropertiesTests.java b/src/test/java/org/springframework/data/redis/support/collections/RedisPropertiesTests.java index 389cc9c41..3baf73df2 100644 --- a/src/test/java/org/springframework/data/redis/support/collections/RedisPropertiesTests.java +++ b/src/test/java/org/springframework/data/redis/support/collections/RedisPropertiesTests.java @@ -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. @@ -227,9 +227,7 @@ public class RedisPropertiesTests extends RedisMapTests { super.testScanWorksCorrectly(); } - /** - * @see DATAREDIS-241 - */ + // DATAREDIS-241 @Parameters public static Collection testParams() {