diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java
index b473a9d4d..884943009 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.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.
@@ -38,15 +38,10 @@ import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
*
* @author Mark Paluch
* @author John Blum
- * @see DATACASS-226
*/
public class CassandraCqlClusterFactoryBeanUnitTests {
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldInitializeWithoutAnyOptions() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -58,11 +53,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getMetricsOptions().isJMXReportingEnabled()).isTrue();
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldShutdownClusterInstance() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -72,11 +63,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(bean.getObject().isClosed()).isTrue();
}
- /**
- * @see DATACASS-217
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-217
public void shouldSetLZ4CompressionType() throws Exception {
CompressionType compressionType = CompressionType.LZ4;
@@ -88,11 +75,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getProtocolOptions(bean).getCompression()).isEqualTo(Compression.LZ4);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetSnappyCompressionType() throws Exception {
CompressionType compressionType = CompressionType.SNAPPY;
@@ -104,11 +87,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getProtocolOptions().getCompression()).isEqualTo(Compression.SNAPPY);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetPoolingOptions() throws Exception {
PoolingOptions poolingOptions = new PoolingOptions();
@@ -120,11 +99,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getPoolingOptions()).isEqualTo(poolingOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetSocketOptions() throws Exception {
SocketOptions socketOptions = new SocketOptions();
@@ -136,11 +111,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getSocketOptions()).isEqualTo(socketOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetQueryOptions() throws Exception {
QueryOptions queryOptions = new QueryOptions();
@@ -152,11 +123,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getQueryOptions()).isEqualTo(queryOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void defaultQueryOptionsShouldHaveOwnObjectIdentity() throws Exception {
QueryOptions queryOptions = new QueryOptions();
@@ -168,11 +135,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getQueryOptions()).isNotEqualTo(queryOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetAuthProvider() throws Exception {
AuthProvider authProvider = new PlainTextAuthProvider("x", "y");
@@ -184,12 +147,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getProtocolOptions().getAuthProvider()).isEqualTo(authProvider);
}
- /**
- * @see DATACASS-226
- * @see DATACASS-263
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226, DATACASS-263
public void shouldSetAuthenticationProvider() throws Exception {
AuthProvider authProvider = new PlainTextAuthProvider("x", "y");
@@ -202,12 +160,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(result).isEqualTo(authProvider);
}
- /**
- * @see DATACASS-226
- * @see DATACASS-263
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226, DATACASS-263
public void shouldSetAuthentication() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -221,11 +174,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(ReflectionTestUtils.getField(result, "password")).isEqualTo((Object) "password");
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetLoadBalancingPolicy() throws Exception {
LoadBalancingPolicy loadBalancingPolicy = new RoundRobinPolicy();
@@ -237,11 +186,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getPolicies().getLoadBalancingPolicy()).isEqualTo(loadBalancingPolicy);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetReconnectionPolicy() throws Exception {
ReconnectionPolicy reconnectionPolicy = new ExponentialReconnectionPolicy(1, 2);
@@ -253,11 +198,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getPolicies().getReconnectionPolicy()).isEqualTo(reconnectionPolicy);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetProtocolVersion() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -268,11 +209,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
.contains(ProtocolVersion.V2);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetSslOptions() throws Exception {
SSLOptions sslOptions = JdkSSLOptions.builder().build();
@@ -285,11 +222,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getProtocolOptions().getSSLOptions()).isEqualTo(sslOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldDisableMetrics() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -299,11 +232,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getConfiguration(bean).getMetricsOptions().isEnabled()).isFalse();
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldDisableJmxReporting() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -325,10 +254,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
verify(mockClusterBuilderConfigurer, times(1)).configure(isA(Cluster.Builder.class));
}
- /**
- * @see DATACASS-316
- */
- @Test
+ @Test // DATACASS-316
public void shouldSetAddressTranslator() throws Exception {
AddressTranslator mockAddressTranslator = mock(AddressTranslator.class);
@@ -340,10 +266,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getPolicies(bean).getAddressTranslator()).isEqualTo(mockAddressTranslator);
}
- /**
- * @see DATACASS-317
- */
- @Test
+ @Test // DATACASS-317
public void shouldSetClusterNameWithBeanNameProperty() throws Exception {
final Cluster.Builder mockClusterBuilder = mock(Cluster.Builder.class);
@@ -364,10 +287,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
verify(mockClusterBuilder, times(1)).withClusterName(eq("ABC"));
}
- /**
- * @see DATACASS-317
- */
- @Test
+ @Test // DATACASS-317
public void shouldSetClusterNameWithClusterNameProperty() throws Exception {
final Cluster.Builder mockClusterBuilder = mock(Cluster.Builder.class);
@@ -388,10 +308,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
verify(mockClusterBuilder, times(1)).withClusterName(eq("XYZ"));
}
- /**
- * @see DATACASS-319
- */
- @Test
+ @Test // DATACASS-319
public void shouldSetMaxSchemaAgreementWaitSeconds() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -402,10 +319,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getProtocolOptions(bean).getMaxSchemaAgreementWaitSeconds()).isEqualTo(20);
}
- /**
- * @see DATACASS-320
- */
- @Test
+ @Test // DATACASS-320
public void shouldSetSpeculativeExecutionPolicy() throws Exception {
SpeculativeExecutionPolicy mockSpeculativeExecutionPolicy = mock(SpeculativeExecutionPolicy.class);
@@ -417,10 +331,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(getPolicies(bean).getSpeculativeExecutionPolicy()).isEqualTo(mockSpeculativeExecutionPolicy);
}
- /**
- * @see DATACASS-238
- */
- @Test
+ @Test // DATACASS-238
public void shouldSetTimestampGenerator() throws Exception {
TimestampGenerator mockTimestampGenerator = mock(TimestampGenerator.class);
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java
index cc342472b..be6a0dbef 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.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.
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import org.junit.Before;
@@ -45,8 +46,6 @@ import com.datastax.driver.core.Session;
*
* @author John Blum
* @see org.springframework.cassandra.config.CassandraCqlSessionFactoryBean
- * @see expectedStartupScripts = asList("/path/to/schema.cql", "/path/to/data.cql");
+
+ List expectedStartupScripts = Arrays.asList("/path/to/schema.cql", "/path/to/data.cql");
CqlOperations mockCqlOperations = mock(CqlOperations.class);
@@ -115,10 +107,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
verify(mockCqlOperations, times(1)).execute(eq(expectedStartupScripts.get(1)));
}
- @Test
+ @Test // DATACASS-219
public void connectToSystemKeyspace() {
- when(mockCluster.connect()).thenReturn(mockSession);
+ when(mockCluster.connect()).thenReturn(mockSession);
factoryBean.setCluster(mockCluster);
assertThat(factoryBean.connect(null)).isEqualTo(mockSession);
@@ -127,10 +119,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
verify(mockCluster, never()).connect(anyString());
}
- @Test
+ @Test // DATACASS-219
public void connectToTargetKeyspace() {
- when(mockCluster.connect(eq("TestKeyspace"))).thenReturn(mockSession);
+ when(mockCluster.connect(eq("TestKeyspace"))).thenReturn(mockSession);
factoryBean.setCluster(mockCluster);
assertThat(factoryBean.connect("TestKeyspace")).isEqualTo(mockSession);
@@ -139,10 +131,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
verify(mockCluster, times(1)).connect(eq("TestKeyspace"));
}
- @Test
+ @Test // DATACASS-219
@SuppressWarnings("unchecked")
public void destroySessionAndExecutesShutdownScripts() throws Exception {
- List expectedShutdownScripts = asList("/path/to/shutdown.cql");
+ List expectedShutdownScripts = Collections.singletonList("/path/to/shutdown.cql");
CqlOperations mockCqlOperations = mock(CqlOperations.class);
@@ -159,35 +151,42 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
inOrder.verify(mockSession, times(1)).close();
}
- @Test
+ @Test // DATACASS-219
public void isConnectedWithNullSessionIsFalse() {
+
assertThat(factoryBean.getObject()).isNull();
assertThat(factoryBean.isConnected()).isFalse();
}
- @Test
+ @Test // DATACASS-219
public void isConnectedWithClosedSessionIsFalse() {
- doReturn(mockSession).when(factoryBean).getObject();
+
+ when(factoryBean.getObject()).thenReturn(mockSession);
when(mockSession.isClosed()).thenReturn(true);
+
assertThat(factoryBean.isConnected()).isFalse();
verify(mockSession, times(1)).isClosed();
}
- @Test
+ @Test // DATACASS-219
public void isConnectedWithOpenSessionIsTrue() {
- doReturn(mockSession).when(factoryBean).getObject();
+
+ when(factoryBean.getObject()).thenReturn(mockSession);
when(mockSession.isClosed()).thenReturn(false);
+
assertThat(factoryBean.isConnected()).isTrue();
verify(mockSession, times(1)).isClosed();
}
- @Test
+ @Test // DATACASS-219
public void setAndGetCluster() {
+
factoryBean.setCluster(mockCluster);
+
assertThat(factoryBean.getCluster()).isEqualTo(mockCluster);
}
- @Test
+ @Test // DATACASS-219
public void setClusterToNullThrowsIllegalArgumentException() {
try {
@@ -199,7 +198,7 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
}
- @Test
+ @Test // DATACASS-219
public void getClusterWhenUninitializedThrowsIllegalStateException() {
try {
@@ -210,20 +209,19 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
}
}
- @Test
+ @Test // DATACASS-219
public void setAndGetKeyspaceName() {
+
assertThat(factoryBean.getKeyspaceName()).isNull();
factoryBean.setKeyspaceName("TEST");
-
assertThat(factoryBean.getKeyspaceName()).isEqualTo("TEST");
factoryBean.setKeyspaceName(null);
-
assertThat(factoryBean.getKeyspaceName()).isNull();
}
- @Test
+ @Test // DATACASS-219
public void getSessionWhenUninitializedThrowsIllegalStateException() {
assertThat(factoryBean.getObject()).isNull();
@@ -237,26 +235,25 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
}
- @Test
+ @Test // DATACASS-219
public void setAndGetStartupScripts() {
+
assertNonNullEmptyCollection(factoryBean.getStartupScripts());
- List expectedStartupScripts = asList("/path/to/schema.cql", "/path/to/data.cql");
-
+ List expectedStartupScripts = Arrays.asList("/path/to/schema.cql", "/path/to/data.cql");
factoryBean.setStartupScripts(expectedStartupScripts);
List actualStartupScripts = factoryBean.getStartupScripts();
-
assertThat(actualStartupScripts).isNotSameAs(expectedStartupScripts).isEqualTo(expectedStartupScripts);
factoryBean.setStartupScripts(null);
-
assertNonNullEmptyCollection(factoryBean.getStartupScripts());
}
- @Test
+ @Test // DATACASS-219
public void startupScriptsAreImmutable() {
- List startupScripts = asList("/path/to/startup.cql");
+
+ List startupScripts = new ArrayList(Collections.singletonList("/path/to/startup.cql"));
factoryBean.setStartupScripts(startupScripts);
@@ -282,29 +279,26 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
@Test
public void setAndGetShutdownScripts() {
+
assertNonNullEmptyCollection(factoryBean.getShutdownScripts());
- List expectedShutdownScripts = asList("/path/to/backup.cql", "/path/to/dropTables.cql");
-
+ List expectedShutdownScripts = Arrays.asList("/path/to/backup.cql", "/path/to/dropTables.cql");
factoryBean.setShutdownScripts(expectedShutdownScripts);
List actualShutdownScripts = factoryBean.getShutdownScripts();
-
assertThat(actualShutdownScripts).isEqualTo(expectedShutdownScripts).isNotSameAs(expectedShutdownScripts);
factoryBean.setShutdownScripts(null);
-
assertNonNullEmptyCollection(factoryBean.getShutdownScripts());
}
- @Test
+ @Test // DATACASS-219
public void shutdownScriptsAreImmutable() {
- List shutdownScripts = asList("/path/to/shutdown.cql");
+ List shutdownScripts = new ArrayList(Collections.singletonList("/path/to/shutdown.cql"));
factoryBean.setShutdownScripts(shutdownScripts);
List actualShutdownScripts = factoryBean.getShutdownScripts();
-
assertThat(actualShutdownScripts).isEqualTo(shutdownScripts).isNotSameAs(shutdownScripts);
shutdownScripts.add("/path/to/corruptSession.cql");
@@ -321,4 +315,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests {
assertThat(actualShutdownScripts).hasSize(1);
}
}
+
+ private void assertNonNullEmptyCollection(Collection> collection) {
+
+ assertThat(collection).isNotNull();
+ assertThat(collection.isEmpty()).isTrue();
+ }
}
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java
index 791a6fcc4..944b0ae4a 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.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.
@@ -47,8 +47,6 @@ import com.datastax.driver.core.PoolingOptions;
* @author David Webb
* @author John Blum
* @author Mark Paluch
- * @see DATACASS-176
- * @see DATACASS-298
*/
@RunWith(MockitoJUnitRunner.class)
public class PoolingOptionsFactoryBeanUnitTests {
@@ -63,7 +61,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
poolingOptionsFactoryBean = new PoolingOptionsFactoryBean();
}
- @Test
+ @Test // DATACASS-176, DATACASS-298
public void getObjectReturnsNullWhenNotInitialized() throws Exception {
assertThat(poolingOptionsFactoryBean.getObject()).isNull();
}
@@ -79,11 +77,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
assertThat(poolingOptionsFactoryBean.isSingleton()).isTrue();
}
- /**
- * @see DATACASS-298
- * @see DATACASS-344
- */
- @Test
+ @Test // DATACASS-298, DATACASS-344
public void setAndGetFactoryBeanProperties() {
poolingOptionsFactoryBean.setHeartbeatIntervalSeconds(15);
@@ -113,10 +107,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
assertThat(poolingOptionsFactoryBean.getRemoteMinSimultaneousRequests()).isEqualTo(50);
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void afterPropertiesSetInitializesLocalPoolingOptions() throws Exception {
PoolingOptionsFactoryBean poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() {
@@ -157,10 +148,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
verify(poolingOptionsSpy, never()).setNewConnectionThreshold(eq(HostDistance.REMOTE), anyInt());
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void afterPropertiesSetInitializesRemotePoolingOptions() throws Exception {
PoolingOptionsFactoryBean poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() {
@@ -201,10 +189,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
verify(poolingOptionsSpy, never()).setNewConnectionThreshold(eq(HostDistance.REMOTE), eq(5));
}
- /**
- * @see DATACASS-344
- */
- @Test
+ @Test // DATACASS-344
public void afterPropertiesSetInitializesMaxQueueSize() throws Exception {
Method setMaxQueueSize = ReflectionUtils.findMethod(PoolingOptions.class, "setMaxQueueSize", int.class);
@@ -234,11 +219,8 @@ public class PoolingOptionsFactoryBeanUnitTests {
* driver class type... {@link PoolingOptions}! The max values should be set before setting core values. Otherwise the
* core values will be compared with the default max values which is 8. Same for other min-max properties pairs. This
* test checks the same.
- *
- * @throws Exception Any unhandled scenarios will result in a test failure.
- * @see DATACASS-176
*/
- @Test
+ @Test // DATACASS-176
public void afterPropertiesSetProperlySetsPoolingOptionsMaxBeforeMinProperties() throws Exception {
poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() {
@@ -283,10 +265,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
verify(poolingOptions).setNewConnectionThreshold(eq(HostDistance.REMOTE), eq(111));
}
- /**
- * @see DATACASS-176
- */
- @Test
+ @Test // DATACASS-176
public void newLocalHostDistancePoolingOptionsReturnsLocalHostDistancePoolingOptionsFactoryBeanSettings() {
poolingOptionsFactoryBean.setLocalCoreConnections(50);
@@ -308,10 +287,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
assertThat(poolingOptions.getNewConnectionThreshold()).isEqualTo(100);
}
- /**
- * @see DATACASS-176
- */
- @Test
+ @Test // DATACASS-176
public void newLocalHostDistancePoolingOptionsReturnsRemoteHostDistancePoolingOptionsFactoryBeanSettings() {
poolingOptionsFactoryBean.setLocalCoreConnections(50);
@@ -333,10 +309,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
assertThat(poolingOptions.getNewConnectionThreshold()).isEqualTo(40);
}
- /**
- * @see DATACASS-176
- */
- @Test
+ @Test // DATACASS-176
public void configureLocalHostDistancePoolingOptionsCallsConfigureWithExpectedInstance() {
final PoolingOptionsFactoryBean.HostDistancePoolingOptions mockHostDistancePoolingOptions = mock(
@@ -362,10 +335,7 @@ public class PoolingOptionsFactoryBeanUnitTests {
verify(mockHostDistancePoolingOptions).configure(same(poolingOptionsSpy));
}
- /**
- * @see DATACASS-176
- */
- @Test
+ @Test // DATACASS-176
public void configureRemoteHostDistancePoolingOptionsCallsConfigureWithExpectedInstance() {
final PoolingOptionsFactoryBean.HostDistancePoolingOptions mockHostDistancePoolingOptions = mock(
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java
index d8db161c5..0af2c7b9e 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.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.
@@ -45,15 +45,10 @@ import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
* @author Mark Paluch
* @author John Blum
* @soundtrack Max Graham Feat Neev Kennedy - So Caught Up (Dns Project Remix)
- * @see
*/
public class AbstractClusterConfigurationUnitTests {
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldInitializeWithoutAnyOptions() throws Exception {
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
@@ -68,11 +63,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getMetricsOptions().isJMXReportingEnabled()).isTrue();
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetCompressionType() throws Exception {
final CompressionType compressionType = CompressionType.SNAPPY;
@@ -88,11 +79,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getProtocolOptions().getCompression()).isEqualTo(Compression.SNAPPY);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetPoolingOptions() throws Exception {
final PoolingOptions poolingOptions = new PoolingOptions();
@@ -108,11 +95,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getPoolingOptions()).isEqualTo(poolingOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetSocketOptions() throws Exception {
final SocketOptions socketOptions = new SocketOptions();
@@ -128,11 +111,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getSocketOptions()).isEqualTo(socketOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetQueryOptions() throws Exception {
final QueryOptions queryOptions = new QueryOptions();
@@ -148,11 +127,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getQueryOptions()).isEqualTo(queryOptions);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetAuthProvider() throws Exception {
final AuthProvider authProvider = new PlainTextAuthProvider("x", "y");
@@ -168,11 +143,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getProtocolOptions().getAuthProvider()).isEqualTo(authProvider);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetLoadBalancingPolicy() throws Exception {
final LoadBalancingPolicy loadBalancingPolicy = new RoundRobinPolicy();
@@ -188,11 +159,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getPolicies().getLoadBalancingPolicy()).isEqualTo(loadBalancingPolicy);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetReconnectionPolicy() throws Exception {
final ReconnectionPolicy reconnectionPolicy = new ExponentialReconnectionPolicy(1, 2);
@@ -208,11 +175,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getPolicies().getReconnectionPolicy()).isEqualTo(reconnectionPolicy);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetProtocolVersion() throws Exception {
AbstractClusterConfiguration clusterConfiguration = new AbstractClusterConfiguration() {
@@ -227,11 +190,7 @@ public class AbstractClusterConfigurationUnitTests {
.contains(ProtocolVersion.V2);
}
- /**
- * @see DATACASS-226
- * @throws Exception
- */
- @Test
+ @Test // DATACASS-226
public void shouldDisableMetrics() throws Exception {
AbstractClusterConfiguration clusterConfiguration = new AbstractClusterConfiguration() {
@@ -245,10 +204,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(getConfiguration(cluster).getMetricsOptions().isEnabled()).isFalse();
}
- /**
- * @see DATACASS-226
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetKeyspaceCreations() {
final List specification = Collections
@@ -263,10 +219,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(clusterConfiguration.cluster().getKeyspaceCreations()).isEqualTo(specification);
}
- /**
- * @see DATACASS-226
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetKeyspaceDrops() {
final List specification = Collections
@@ -281,10 +234,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(clusterConfiguration.cluster().getKeyspaceDrops()).isEqualTo(specification);
}
- /**
- * @see DATACASS-226
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetStartupScripts() {
final List scripts = Collections.singletonList("USE BLUE_METH; CREATE TABLE...");
@@ -298,10 +248,7 @@ public class AbstractClusterConfigurationUnitTests {
assertThat(clusterConfiguration.cluster().getStartupScripts()).isEqualTo(scripts);
}
- /**
- * @see DATACASS-226
- */
- @Test
+ @Test // DATACASS-226
public void shouldSetShutdownScripts() {
final List scripts = Collections.singletonList("USE BLUE_METH; DROP TABLE...");
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java
index f298672e3..9208128cc 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.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.
@@ -52,10 +52,7 @@ public class CassandraCqlClusterParserUnitTests {
private CassandraCqlClusterParser parser = new CassandraCqlClusterParser();
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void resolveIdFromElement() {
when(mockElement.getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE))).thenReturn("test");
@@ -64,10 +61,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void resolveIdUsingDefault() {
when(mockElement.getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE))).thenReturn("");
@@ -76,10 +70,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseInternalCallsDoParseAndConstructsBeanDefinition() {
BeanDefinition mockContainingBeanDefinition = mock(BeanDefinition.class);
@@ -171,10 +162,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getAttribute(eq("username"));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseChildElementsWithLocalPoolingOptions() {
Element localPoolingOptionsElement = mock(Element.class);
@@ -228,10 +216,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(localPoolingOptionsElement).getAttribute(eq("min-simultaneous-requests"));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseChildElementsWithRemotePoolingOptions() {
Element localPoolingOptionsElement = mock(Element.class);
@@ -285,10 +270,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(localPoolingOptionsElement).getAttribute(eq("min-simultaneous-requests"));
}
- /**
- * @see DATACASS-242
- */
- @Test
+ @Test // DATACASS-242
public void parseChildElementsWithStartupAndShutdownScripts() {
Element mockStartupCqlOne = mock(Element.class, "MockStartupCqlOne");
@@ -322,10 +304,7 @@ public class CassandraCqlClusterParserUnitTests {
assertThat(shutdownScripts).contains("DROP KEYSPACE test;", "DROP USER jblum;");
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseLocalPoolingOptionsProperlyConfiguresBeanDefinition() {
when(mockElement.getAttribute(eq("core-connections"))).thenReturn("50");
@@ -362,10 +341,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getAttribute(eq("min-simultaneous-requests"));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseRemotePoolingOptionsProperlyConfiguresBeanDefinition() {
when(mockElement.getAttribute(eq("core-connections"))).thenReturn("50");
@@ -402,10 +378,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getAttribute(eq("min-simultaneous-requests"));
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void parseScript() {
when(mockElement.getTextContent()).thenReturn("CREATE TABLE schema.table;");
@@ -413,10 +386,7 @@ public class CassandraCqlClusterParserUnitTests {
verify(mockElement).getTextContent();
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void newSocketOptionsBeanDefinitionIsProperlyInitialized() {
when(mockElement.getAttribute(eq("connect-timeout-millis"))).thenReturn("15000");
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java
index 2af0756ea..00f8dafed 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.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.
@@ -36,10 +36,7 @@ public class ParsingUtilsUnitTests {
@Rule public ExpectedException exception = ExpectedException.none();
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addOptionalReferencePropertyUsesDefault() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -51,10 +48,7 @@ public class ParsingUtilsUnitTests {
assertThat(propertyValue.getBeanName()).isEqualTo("defaultBeanReference");
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addOptionalReferencePropertyWithNoValueDoesReturnsWithoutAdding() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -66,10 +60,7 @@ public class ParsingUtilsUnitTests {
assertThat(beanDefinition.getPropertyValues().isEmpty()).isTrue();
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addOptionalValuePropertyUsesDefault() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -80,10 +71,7 @@ public class ParsingUtilsUnitTests {
assertThat(propertyValue).isEqualTo("defaultValue");
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addOptionalValuePropertyWithNoValueDoesReturnsWithoutAdding() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -95,10 +83,7 @@ public class ParsingUtilsUnitTests {
assertThat(beanDefinition.getPropertyValues().isEmpty()).isTrue();
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addRequiredReferencePropertyIsSuccessful() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -110,10 +95,7 @@ public class ParsingUtilsUnitTests {
assertThat(propertyValue.getBeanName()).isEqualTo("reference");
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addRequiredReferencePropertyWithNoReferenceFails() {
exception.expect(IllegalArgumentException.class);
@@ -123,10 +105,7 @@ public class ParsingUtilsUnitTests {
"defaultReference", true, true);
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addRequiredValuePropertyIsSuccessful() {
BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(),
@@ -137,10 +116,7 @@ public class ParsingUtilsUnitTests {
assertThat(propertyValue).isEqualTo("value");
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addRequiredValuePropertyWithNoValueFails() {
exception.expect(IllegalArgumentException.class);
@@ -150,10 +126,7 @@ public class ParsingUtilsUnitTests {
false);
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addPropertyThrowsIllegalArgumentExceptionForNullBuilder() {
exception.expect(IllegalArgumentException.class);
@@ -162,10 +135,7 @@ public class ParsingUtilsUnitTests {
ParsingUtils.addProperty(null, "propertyName", "value", "defaultValue", false, false);
}
- /**
- * @see DATACASS-298
- */
- @Test
+ @Test // DATACASS-298
public void addPropertyThrowsIllegalArgumentExceptionForNullPropertyName() {
exception.expect(IllegalArgumentException.class);
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java
index c66e3581c..fcca5805c 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.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.
@@ -20,6 +20,8 @@ import static org.assertj.core.api.Assertions.*;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.*;
+import edu.umd.cs.mtc.MultithreadedTestCase;
+
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@@ -34,13 +36,10 @@ import org.mockito.runners.MockitoJUnitRunner;
import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.Session;
-import edu.umd.cs.mtc.MultithreadedTestCase;
-
/**
* Unit tests for {@link CachedPreparedStatementCreator}.
*
* @author Mark Paluch
- * @see DATACASS-253
*/
@RunWith(MockitoJUnitRunner.class)
public class CachedPreparedStatementCreatorUnitTests {
@@ -55,26 +54,17 @@ public class CachedPreparedStatementCreatorUnitTests {
when(sessionMock.prepare(anyString())).thenReturn(preparedStatement);
}
- /**
- * @see DATACASS-253
- */
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class) // DATACASS-253
public void shouldRejectEmptyCql() {
new CachedPreparedStatementCreator("");
}
- /**
- * @see DATACASS-253
- */
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class) // DATACASS-253
public void shouldRejectNullCql() {
new CachedPreparedStatementCreator(null);
}
- /**
- * @see DATACASS-253
- */
- @Test
+ @Test // DATACASS-253
public void shouldCreatePreparedStatement() {
CachedPreparedStatementCreator cachedPreparedStatementCreator = new CachedPreparedStatementCreator("my cql");
@@ -85,10 +75,7 @@ public class CachedPreparedStatementCreatorUnitTests {
verify(sessionMock).prepare("my cql");
}
- /**
- * @see DATACASS-253
- */
- @Test
+ @Test // DATACASS-253
public void shouldCacheCreatePreparedStatement() {
CachedPreparedStatementCreator cachedPreparedStatementCreator = new CachedPreparedStatementCreator("my cql");
@@ -102,11 +89,7 @@ public class CachedPreparedStatementCreatorUnitTests {
verify(sessionMock, times(1)).prepare("my cql");
}
- /**
- * @see DATACASS-253
- * @throws Throwable
- */
- @Test
+ @Test // DATACASS-253
public void concurrentAccessToCreateStatementShouldBeSynchronized() throws Throwable {
CreatePreparedStatementIsThreadSafe concurrentPrepareStatement = new CreatePreparedStatementIsThreadSafe(
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java
index 1ab994de0..12b0b75d3 100644
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.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,7 +32,6 @@ import org.junit.runners.Parameterized.Parameters;
* Unit tests for {@link ConsistencyLevelResolver}.
*
* @author Mark Paluch
- * @see DATACASS-202
*/
@RunWith(Parameterized.class)
public class ConsistencyLevelResolverUnitTests {
@@ -80,10 +79,7 @@ public class ConsistencyLevelResolverUnitTests {
return parameters;
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void shouldResolveCorrectly() {
assertThat(ConsistencyLevelResolver.resolve(from)).isEqualTo(expected);
}
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java
index 250bd455d..d79e67278 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.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.
@@ -97,10 +97,7 @@ public class CqlTemplateUnitTests {
verify(mockSession, times(1)).execute(eq("test"));
}
- /**
- * @see DATACASS-304
- */
- @Test
+ @Test // DATACASS-304
public void doExecuteInSessionCallbackTranslatesToCassandraException() {
exception.expect(CassandraReadTimeoutException.class);
exception.expectCause(org.hamcrest.Matchers.isA(ReadTimeoutException.class));
@@ -113,10 +110,7 @@ public class CqlTemplateUnitTests {
});
}
- /**
- * @see DATACASS-304
- */
- @Test
+ @Test // DATACASS-304
public void doExecuteInSessionCallbackTranslatesToCassandraUncategorizedException() {
try {
@@ -132,10 +126,7 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-304
- */
- @Test
+ @Test // DATACASS-304
public void doExecuteInSessionCallbackTranslatesToCassandraUncategorizedDataAccessException() {
try {
@@ -191,10 +182,7 @@ public class CqlTemplateUnitTests {
verifyZeroInteractions(mockResultSet);
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void firstColumnToObjectReturnsColumnValue() {
final Row mockRow = mock(Row.class);
@@ -226,10 +214,7 @@ public class CqlTemplateUnitTests {
verifyZeroInteractions(mockColumnDefinition);
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void firstColumnToObjectReturnsNull() {
Row mockRow = mock(Row.class);
@@ -248,10 +233,7 @@ public class CqlTemplateUnitTests {
verify(mockIterator, never()).next();
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneIsSuccessful() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -270,10 +252,7 @@ public class CqlTemplateUnitTests {
verifyZeroInteractions(mockRow);
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneThrowsIncorrectResultSetSizeDataAccessExceptionWhenNoRowsFound() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -294,10 +273,7 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneThrowsIncorrectResultSetSizeDataAccessExceptionWhenTooManyRowsFound() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -320,10 +296,7 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOnePassingNullResultSetThrowsIllegalArgumentException() {
RowMapper mockRowMapper = mock(RowMapper.class);
@@ -336,10 +309,7 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneWithRequiredTypeIsSuccessful() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -365,10 +335,7 @@ public class CqlTemplateUnitTests {
verifyZeroInteractions(mockRow);
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneWithRequiredTypeThrowsIncorrectResultSetSizeDataAccessExceptionWhenNoRowsFound() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -386,10 +353,7 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneWithRequiredTypeThrowsIncorrectResultSetSizeDataAccessExceptionWhenTooManyRowsFound() {
ResultSet mockResultSet = mock(ResultSet.class);
@@ -411,20 +375,14 @@ public class CqlTemplateUnitTests {
}
}
- /**
- * @see DATACASS-286
- */
- @Test
+ @Test // DATACASS-286
public void processOneWithRequiredTypePassingNullResultSetThrowsIllegalArgumentException() {
exception.expect(IllegalArgumentException.class);
template.processOne(null, String.class);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addPreparedStatementOptionsShouldAddDriverQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder() //
@@ -438,10 +396,7 @@ public class CqlTemplateUnitTests {
verify(mockPreparedStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addPreparedStatementOptionsShouldAddOurQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build();
@@ -454,10 +409,7 @@ public class CqlTemplateUnitTests {
verify(mockPreparedStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addStatementQueryOptionsShouldAddDriverQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder().consistencyLevel(ConsistencyLevel.EACH_QUORUM) //
@@ -470,10 +422,7 @@ public class CqlTemplateUnitTests {
verify(mockStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addStatementQueryOptionsShouldAddOurQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build();
@@ -486,10 +435,7 @@ public class CqlTemplateUnitTests {
verify(mockStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addStatementQueryOptionsShouldNotAddOptions() {
QueryOptions queryOptions = QueryOptions.builder().build();
@@ -499,10 +445,7 @@ public class CqlTemplateUnitTests {
verifyZeroInteractions(mockStatement);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addStatementQueryOptionsShouldAddGenericQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder() //
@@ -518,10 +461,7 @@ public class CqlTemplateUnitTests {
verify(mockStatement).enableTracing();
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addInsertWriteOptionsShouldAddDriverQueryOptions() {
WriteOptions writeOptions = WriteOptions.builder() //
@@ -539,10 +479,7 @@ public class CqlTemplateUnitTests {
verify(mockInsert).using(Mockito.any(Using.class));
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void addUpdateWriteOptionsShouldAddDriverQueryOptions() {
WriteOptions writeOptions = WriteOptions.builder() //
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java
index 632e79cf1..a1b8d3307 100644
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.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,10 +33,7 @@ import com.datastax.driver.core.policies.LoggingRetryPolicy;
*/
public class QueryOptionsUnitTests {
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildQueryOptions() {
QueryOptions queryOptions = QueryOptions.builder() //
@@ -56,10 +53,7 @@ public class QueryOptionsUnitTests {
assertThat(queryOptions.getTracing()).isTrue();
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildQueryOptionsWithDriverRetryPolicy() {
QueryOptions writeOptions = QueryOptions.builder() //
@@ -70,10 +64,7 @@ public class QueryOptionsUnitTests {
assertThat(writeOptions.getDriverRetryPolicy()).isInstanceOf(LoggingRetryPolicy.class);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildQueryOptionsWithRetryPolicy() {
QueryOptions writeOptions = QueryOptions.builder() //
@@ -84,26 +75,17 @@ public class QueryOptionsUnitTests {
assertThat(writeOptions.getDriverRetryPolicy()).isNull();
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void builderShouldRejectSettingOurAndDriverRetryPolicy() {
QueryOptions.builder().retryPolicy(RetryPolicy.DEFAULT).retryPolicy(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void builderShouldRejectSettingDriverAndOurRetryPolicy() {
QueryOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).retryPolicy(RetryPolicy.DEFAULT);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void shouldRejectSettingOurAndDriverRetryPolicy() {
QueryOptions queryOptions = new QueryOptions();
@@ -111,10 +93,7 @@ public class QueryOptionsUnitTests {
queryOptions.setRetryPolicy(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void shouldRejectSettingDriverAndOurRetryPolicy() {
QueryOptions queryOptions = new QueryOptions();
@@ -122,10 +101,7 @@ public class QueryOptionsUnitTests {
queryOptions.setRetryPolicy(RetryPolicy.DEFAULT);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void shouldRejectSettingOurAndDriverConsistencyLevel() {
QueryOptions queryOptions = new QueryOptions();
@@ -133,10 +109,7 @@ public class QueryOptionsUnitTests {
queryOptions.setConsistencyLevel(ConsistencyLevel.ANY);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void shouldRejectSettingDriverAndOurConsistencyLevel() {
QueryOptions queryOptions = new QueryOptions();
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java
index 06d74d3c5..e58b01d23 100644
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.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.
@@ -30,10 +30,7 @@ import com.datastax.driver.core.policies.FallthroughRetryPolicy;
*/
public class WriteOptionsUnitTests {
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildWriteOptions() {
WriteOptions writeOptions = WriteOptions.builder() //
@@ -54,10 +51,7 @@ public class WriteOptionsUnitTests {
assertThat(writeOptions.getTracing()).isTrue();
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildReadTimeoutOptionsWriteOptions() {
WriteOptions writeOptions = WriteOptions.builder().readTimeout(1, TimeUnit.MINUTES).build();
@@ -67,10 +61,7 @@ public class WriteOptionsUnitTests {
assertThat(writeOptions.getTracing()).isNull();
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildQueryOptionsWithDriverRetryPolicy() {
QueryOptions writeOptions = QueryOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).build();
@@ -79,10 +70,7 @@ public class WriteOptionsUnitTests {
assertThat(writeOptions.getDriverRetryPolicy()).isEqualTo(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test
+ @Test // DATACASS-202
public void buildQueryOptionsWithRetryPolicy() {
QueryOptions writeOptions = QueryOptions.builder().retryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY).build();
@@ -91,18 +79,12 @@ public class WriteOptionsUnitTests {
assertThat(writeOptions.getDriverRetryPolicy()).isNull();
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void builderShouldRejectSettingOurAndDriverRetryPolicy() {
WriteOptions.builder().retryPolicy(RetryPolicy.DEFAULT).retryPolicy(FallthroughRetryPolicy.INSTANCE);
}
- /**
- * @see DATACASS-202
- */
- @Test(expected = IllegalStateException.class)
+ @Test(expected = IllegalStateException.class) // DATACASS-202
public void builderShouldRejectSettingDriverAndOurRetryPolicy() {
WriteOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).retryPolicy(RetryPolicy.DEFAULT);
}
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java
index 75ba52efb..e8a5c9422 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.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/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java
index b31499892..6e120d299 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.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/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java
index 9ed3e84a0..ad2587573 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.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/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java
index d10b5438e..c2d01a53e 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.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/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java
index b7cf0a461..37a18e71d 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.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/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java
index ed17c5fc0..c2625ecb7 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.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,7 +37,6 @@ import com.datastax.driver.core.TableMetadata;
* Integration tests tests for {@link AlterTableCqlGenerator}.
*
* @author Mark Paluch
- * @see DATACASS-192
*/
public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCreatingIntegrationTest {
@@ -48,10 +47,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
session.execute("DROP TABLE IF EXISTS users;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAlterColumnType() {
session.execute(
@@ -67,10 +63,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(column.getType()).isEqualTo(DataType.varint());
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAlterListColumnType() {
session.execute(
@@ -86,10 +79,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(column.getType()).isEqualTo((DataType) DataType.list(DataType.varchar()));
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddColumn() {
session.execute(
@@ -105,10 +95,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(column.getType()).isEqualTo(DataType.varchar());
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddListColumn() {
session.execute("CREATE TABLE users (user_name varchar PRIMARY KEY);");
@@ -123,10 +110,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(column.getType()).isEqualTo((DataType) DataType.list(DataType.ascii()));
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableDropColumn() {
session.execute("CREATE TABLE addamsFamily (name varchar PRIMARY KEY, gender varchar);");
@@ -138,10 +122,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(getTableMetadata("addamsfamily").getColumn("gender")).isNull();
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableRenameColumn() {
session.execute("CREATE TABLE addamsFamily (name varchar PRIMARY KEY, firstname varchar);");
@@ -154,10 +135,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea
assertThat(getTableMetadata("addamsfamily").getColumn("newname")).isNotNull();
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddCaching() {
session.execute("CREATE TABLE users (user_name varchar PRIMARY KEY);");
diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java
index 948f68d10..0c92ea0d4 100755
--- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java
+++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.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 com.datastax.driver.core.DataType;
*/
public class AlterTableCqlGeneratorUnitTests {
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAlterColumnType() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").alter("lastKnownLocation",
@@ -49,10 +46,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ALTER lastknownlocation TYPE uuid;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAlterListColumnType() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").alter("lastKnownLocation",
@@ -61,10 +55,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ALTER lastknownlocation TYPE list;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddColumn() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").add("gravesite",
@@ -73,10 +64,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ADD gravesite varchar;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddListColumn() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("users").add("top_places",
@@ -85,10 +73,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE users ADD top_places list;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableDropColumn() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").drop("gender");
@@ -96,10 +81,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily DROP gender;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableRenameColumn() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").rename("firstname", "lastname");
@@ -107,10 +89,7 @@ public class AlterTableCqlGeneratorUnitTests {
assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily RENAME firstname TO lastname;");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddCommentAndTableOption() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily")
@@ -120,10 +99,7 @@ public class AlterTableCqlGeneratorUnitTests {
"ALTER TABLE addamsfamily WITH read_repair_chance = 0.2 AND comment = 'A most excellent and useful table';");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddColumnAndComment() {
AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily")
@@ -134,10 +110,7 @@ public class AlterTableCqlGeneratorUnitTests {
"ALTER TABLE addamsfamily ADD top_places list ADD other list WITH comment = 'A most excellent and useful table';");
}
- /**
- * @see DATACASS-192
- */
- @Test
+ @Test // DATACASS-192
public void alterTableAddCaching() {
Map