Source:
<code><START> public void testSkipDataTableAndPostIndexPartialRowUpdate() throws Exception { <END> String dataTableName = generateUniqueName(); populateTable(dataTableName); Connection conn = DriverManager.getConnection(getUrl()); String indexName = generateUniqueName(); conn.createStatement().execute("CREATE INDEX " + indexName + "1 on " + dataTableName + " (val1) include (val2, val3)" + (async ? "ASYNC" : "")); conn.createStatement().execute("CREATE INDEX " + indexName + "2 on " + dataTableName + " (val2) include (val1, val3)" + (async ? "ASYNC" : "")); if (async) { IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "1"); IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "2"); } conn.createStatement().execute("upsert into " + dataTableName + " (id, val3) values ('a', 'abcdd')"); conn.commit(); String selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val1 = 'ab'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "1"); ResultSet rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val2 = 'abc'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "2"); rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); conn.close(); }</code><technical_language>Name of test is inaccurate longer skip data table post index write -- this appears testing happy path update succeeds in 3 phases multiple indexes. (Which is a useful test, name reflect it.)</technical_language>

Target:
public void testSkipDataTableAndPostIndexPartialRowUpdate() throws Exception { String dataTableName = generateUniqueName(); populateTable(dataTableName); Connection conn = DriverManager.getConnection(getUrl()); String indexName = generateUniqueName(); conn.createStatement().execute("CREATE INDEX " + indexName + "1 on " + dataTableName + " (val1) include (val2, val3)" + (async ? "ASYNC" : "")); conn.createStatement().execute("CREATE INDEX " + indexName + "2 on " + dataTableName + " (val2) include (val1, val3)" + (async ? "ASYNC" : "")); if (async) { IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "1"); IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "2"); } IndexRegionObserver.setSkipDataTableUpdatesForTesting(true); IndexRegionObserver.setSkipPostIndexUpdatesForTesting(true); conn.createStatement().execute("upsert into " + dataTableName + " (id, val2) values ('a', 'abcc')"); conn.commit(); IndexRegionObserver.setSkipDataTableUpdatesForTesting(false); IndexRegionObserver.setSkipPostIndexUpdatesForTesting(false); conn.createStatement().execute("upsert into " + dataTableName + " (id, val3) values ('a', 'abcdd')"); conn.commit(); String selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val1 = 'ab'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "1"); ResultSet rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val2 = 'abc'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "2"); rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); conn.close(); }