Github user twdsilva commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/133#discussion_r45679822
  
    --- Diff: 
phoenix-core/src/it/java/org/apache/phoenix/transactions/RecreateTableIT.java 
---
    @@ -0,0 +1,59 @@
    +/*
    + * 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.transactions;
    +
    +import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
    +
    +import java.sql.Connection;
    +import java.sql.DriverManager;
    +import java.sql.SQLException;
    +import java.sql.Statement;
    +import java.util.Map;
    +import java.util.Properties;
    +
    +import org.apache.phoenix.end2end.BaseHBaseManagedTimeIT;
    +import org.apache.phoenix.end2end.Shadower;
    +import org.apache.phoenix.query.BaseTest;
    +import org.apache.phoenix.util.PropertiesUtil;
    +import org.apache.phoenix.util.ReadOnlyProps;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +import com.google.common.collect.Maps;
    +
    +public class RecreateTableIT extends BaseTest {
    +
    +    @BeforeClass
    +    @Shadower(classBeingShadowed = BaseHBaseManagedTimeIT.class)
    +    public static void doSetup() throws Exception {
    +        Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
    +        setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
    +    }
    +
    +    @Test
    +    public void testReCreateTxnTableAfterDroppingExistingNonTxnTable() 
throws SQLException {
    +        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
    +        Connection conn = DriverManager.getConnection(getUrl(), props);
    +        conn.setAutoCommit(false);
    +        Statement stmt = conn.createStatement();
    +        stmt.execute("CREATE TABLE DEMO(k VARCHAR PRIMARY KEY, v1 VARCHAR, 
v2 VARCHAR)");
    +        stmt.execute("DROP TABLE DEMO");
    +        stmt.execute("CREATE TABLE DEMO(k VARCHAR PRIMARY KEY, v1 VARCHAR, 
v2 VARCHAR) TRANSACTIONAL=true");
    +        stmt.execute("CREATE INDEX DEMO_idx ON DEMO (v1) INCLUDE(v2)");
    --- End diff --
    
    dropping a table and recreating it as a txn table was failing. I will add 
the asserts.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to