echauchot commented on code in PR #35: URL: https://github.com/apache/flink-connector-cassandra/pull/35#discussion_r2324568878
########## flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/table/CassandraClusterBuilderTest.java: ########## @@ -0,0 +1,214 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.flink.connector.cassandra.table; + +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.ConsistencyLevel; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +/** Unit tests for {@link CassandraClusterBuilder}. */ +class CassandraClusterBuilderTest { + + /** Tests default constructor creates builder with sensible defaults for local development. */ + @Test + void testDefaultConstructor() { + CassandraClusterBuilder builder = new CassandraClusterBuilder(); + + /** Should build cluster without throwing exceptions */ + Cluster cluster = builder.getCluster(); + assertThat(cluster).isNotNull(); + + /** Verify default configuration is accessible */ + assertThat(cluster.getConfiguration().getProtocolOptions().getPort()).isEqualTo(9042); + assertThat(cluster.getConfiguration().getQueryOptions().getConsistencyLevel()) + .isEqualTo(ConsistencyLevel.LOCAL_ONE); + + cluster.close(); + } + + /** Tests parameterized constructor with valid configuration values. */ + @Test + void testParameterizedConstructor() { Review Comment: missing ip, pass, user assertions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org