Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/129#discussion_r45306913 --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java --- @@ -135,230 +154,282 @@ public void tearDown() throws Exception { @Ignore("See PHOENIX-2331") @Test(timeout=300000) public void testWriteFailureDisablesLocalIndex() throws Exception { - testWriteFailureDisablesIndex(true); + helpTestWriteFailureDisablesIndex(true); } @Ignore("See PHOENIX-2332") @Test(timeout=300000) public void testWriteFailureDisablesIndex() throws Exception { - testWriteFailureDisablesIndex(false); + helpTestWriteFailureDisablesIndex(false); } - public void testWriteFailureDisablesIndex(boolean localIndex) throws Exception { - String query; - ResultSet rs; - + public void helpTestWriteFailureDisablesIndex(boolean localIndex) throws Exception { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); - Connection conn = driver.connect(url, props); - conn.setAutoCommit(false); - conn.createStatement().execute( - "CREATE TABLE " + DATA_TABLE_FULL_NAME + " (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"); - query = "SELECT * FROM " + DATA_TABLE_FULL_NAME; - rs = conn.createStatement().executeQuery(query); - assertFalse(rs.next()); - - if(localIndex) { - conn.createStatement().execute( - "CREATE LOCAL INDEX " + INDEX_TABLE_NAME + " ON " + DATA_TABLE_FULL_NAME + " (v1) INCLUDE (v2)"); - conn.createStatement().execute( - "CREATE LOCAL INDEX " + INDEX_TABLE_NAME+ "_2" + " ON " + DATA_TABLE_FULL_NAME + " (v2) INCLUDE (v1)"); - } else { + try (Connection conn = driver.connect(url, props)) { + String query; + ResultSet rs; + conn.setAutoCommit(false); conn.createStatement().execute( - "CREATE INDEX " + INDEX_TABLE_NAME + " ON " + DATA_TABLE_FULL_NAME + " (v1) INCLUDE (v2)"); - } + "CREATE TABLE " + DATA_TABLE_FULL_NAME + " (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"); --- End diff -- Are different table names required for transactional versus non transactional tables?
--- 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. ---