nvharikrishna commented on code in PR #2331: URL: https://github.com/apache/cassandra/pull/2331#discussion_r1192945100
########## test/unit/org/apache/cassandra/db/virtual/ClientsTableKeyspaceColTest.java: ########## @@ -0,0 +1,124 @@ +/* + * 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.cassandra.db.virtual; + +import java.io.IOException; +import java.net.InetAddress; +import java.util.List; + +import com.google.common.collect.ImmutableList; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import org.apache.cassandra.ServerTestUtils; +import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.cql3.CQLTester; +import org.apache.cassandra.service.EmbeddedCassandraService; + +public class ClientsTableKeyspaceColTest extends CQLTester Review Comment: I wanted to control connection/session establishment so that keyspace_name can be verified just for that user. CQLTester doesn't have a public/protected method to get cluster and session instances. I did not find CQLTester using `cluster.connect(keyspace)`. So I created a separate test class with cluster and session instances explicitly constructed. It cannot be done with `ClientsTableTest` as everything done through CQLTester.setUpClass(). I realised that this test doesn't have to extend CQLTester. Thanks for pointing it out. Cleared it. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

