Source:
<code>public void testMultiPartitionLoad() throws Exception { if (isHSQL()) { System.out.println("Skip testMultiPartitionLoad for HSQL"); return; } Client client = getClient(); VoltTable table; ClientResponse r; table = m_template.clone(100); table.addRow(1, 1, 1, "1", 1.0); table.addRow(2, 1, 2, "2", 2.0); table.addRow(3, 2, 3, "3", 3.0); table.addRow(4, 2, 4, "4", 4.0); r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); assertEquals(ClientResponse.SUCCESS, r.getStatus()); assertEquals(1, r.getResults().length); assertEquals(4, r.getResults()[0].asScalarLong()); assertEquals(4, countReplicatedRows(client)); table = m_template.clone(100); table.addRow(1, 1, 1, "1", 1.0); table.addRow(2, 1, 2, "2", 2.0); table.addRow(3, 2, 3, "3", 3.0); table.addRow(4, 2, 4, "4", 4.0); try { r = client.callProcedure("@LoadMultipartitionTable", "PARTITIONED", upsertMode, table); fail(); } catch (ProcCallException e) { <START> e.printStackTrace(); <END> } table = m_template.clone(100); table.addRow(5, 1, 5, "5", 5.0); table.addRow(5, 1, 5, "5", 5.0); try { r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); fail(); } catch (ProcCallException e) { e.printStackTrace(); } table = m_template.clone(100); table.addRow(6, 1, 5, "6", 5.0); table.addRow(7, 1, 5, "777", 5.0); try { r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); fail(); } catch (ProcCallException e) { e.printStackTrace(); } assertEquals(4, countReplicatedRows(client)); }</code><technical_language>do need print out stack trace exception expected</technical_language>

Target:
public void testMultiPartitionLoad() throws Exception { if (isHSQL()) { System.out.println("Skip testMultiPartitionLoad for HSQL"); return; } Client client = getClient(); VoltTable table; ClientResponse r; table = m_template.clone(100); table.addRow(1, 1, 1, "1", 1.0); table.addRow(2, 1, 2, "2", 2.0); table.addRow(3, 2, 3, "3", 3.0); table.addRow(4, 2, 4, "4", 4.0); r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); assertEquals(ClientResponse.SUCCESS, r.getStatus()); assertEquals(1, r.getResults().length); assertEquals(4, r.getResults()[0].asScalarLong()); assertEquals(4, countReplicatedRows(client)); table = m_template.clone(100); table.addRow(1, 1, 1, "1", 1.0); table.addRow(2, 1, 2, "2", 2.0); table.addRow(3, 2, 3, "3", 3.0); table.addRow(4, 2, 4, "4", 4.0); try { r = client.callProcedure("@LoadMultipartitionTable", "PARTITIONED", upsertMode, table); fail(); } catch (ProcCallException e) { assertTrue(e.getMessage().contains("no longer supports loading partitioned tables")); } table = m_template.clone(100); table.addRow(5, 1, 5, "5", 5.0); table.addRow(5, 1, 5, "5", 5.0); try { r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); fail(); } catch (ProcCallException e) { assertTrue(e.getMessage().contains("CONSTRAINT VIOLATION")); } table = m_template.clone(100); table.addRow(6, 1, 5, "6", 5.0); table.addRow(7, 1, 5, "777", 5.0); try { r = client.callProcedure("@LoadMultipartitionTable", "REPLICATED", upsertMode, table); fail(); } catch (ProcCallException e) { assertTrue(e.getMessage().contains("SQL ERROR")); } assertEquals(4, countReplicatedRows(client)); }