Github user samarthjain commented on a diff in the pull request: https://github.com/apache/phoenix/pull/127#discussion_r44853201 --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/MutableRollbackIT.java --- @@ -0,0 +1,506 @@ +package org.apache.phoenix.end2end.index.txn; + +import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Properties; + +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.ResultScanner; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.phoenix.end2end.BaseHBaseManagedTimeIT; +import org.apache.phoenix.end2end.Shadower; +import org.apache.phoenix.jdbc.PhoenixConnection; +import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.util.PropertiesUtil; +import org.apache.phoenix.util.ReadOnlyProps; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.google.common.collect.Maps; + +@RunWith(Parameterized.class) +public class MutableRollbackIT extends BaseHBaseManagedTimeIT { + + private final boolean localIndex; + + public MutableRollbackIT(boolean localIndex) { + this.localIndex = localIndex; + } + + @BeforeClass + @Shadower(classBeingShadowed = BaseHBaseManagedTimeIT.class) + public static void doSetup() throws Exception { + Map<String,String> props = Maps.newHashMapWithExpectedSize(2); + props.put(QueryServices.DEFAULT_TRANSACTIONAL_ATTRIB, Boolean.toString(true)); + // We need this b/c we don't allow a transactional table to be created if the underlying + // HBase table already exists (since we don't know if it was transactional before). + props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.toString(true)); --- End diff -- You might be better off using a different table name for each test. A good option is to use the test name itself as the table name combined with some random number. The reason being, dropping the underlying HBase table is going to make your test really slow. I have in past combined using different table names with running the test in its own cluster. See AlterTableIT as an example.
--- 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. ---