virajjasani commented on a change in pull request #917: URL: https://github.com/apache/phoenix/pull/917#discussion_r506962076
########## File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterParentTableWithSysCatRollbackIT.java ########## @@ -0,0 +1,142 @@ +/* + * 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.phoenix.end2end; + +import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.query.BaseTest; +import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; +import org.apache.phoenix.util.ReadOnlyProps; +import org.apache.phoenix.util.SchemaUtil; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Collections; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +@Category(NeedsOwnMiniClusterTest.class) +public class AlterParentTableWithSysCatRollbackIT extends BaseTest { + + private String getJdbcUrl() { + return "jdbc:phoenix:localhost:" + getUtility().getZkCluster().getClientPort() + + ":/hbase"; + } + + @BeforeClass + public static synchronized void doSetup() throws Exception { + Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(1); + serverProps.put(QueryServices.ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK, "true"); Review comment: Thanks @yanxinyi , I think there are tests related to `ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK`=false but `CANNOT_MUTATE_TABLE` error code is not tested for table and view both. Also, without this source code change, this test will fail because we don't have coverage for View. Hence, thought of writing it separately to cover all 4 cases together: add/delete and table/view. Hence, I think for `false` value of `ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK`, we don't need additional test :) Sounds good? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org