// don't care if this succeeds or fails.
// calling the new proc before the cat change returns is not guaranteed to work
// we just hope it doesn't crash anything
int x = 3;
SyncCallback cb = new SyncCallback();
client.callProcedure(cb,
org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
new long[] {x}, new long[] {x}, x, new long[] {x},
new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
new double[] {x}, new String[] {"a"});
cb.waitForResponse();
// make sure the previous catalog change has completed
client.drain();
// now calling the new proc better work
x = 2;
client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
new long[] {x}, new long[] {x}, x, new long[] {x},
new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
new double[] {x}, new String[] {"a"});
loadSomeData(client, 50, 5);
// this is a do nothing change... shouldn't affect anything
newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-expanded.jar");
results = client.callProcedure("@UpdateApplicationCatalog", newCatalogURL).getResults();
assertTrue(results.length == 1);
client.drain();
// now calling the new proc better work
x = 4;
client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
new long[] {x}, new long[] {x}, x, new long[] {x},
new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
new double[] {x}, new String[] {"a"});
loadSomeData(client, 55, 5);
// remove the procedure we just added async
newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-base.jar");
callback = new CatTestCallback(Status.OK);
client.callProcedure(callback, "@UpdateApplicationCatalog", newCatalogURL);
// don't care if this works now
x = 4;
cb = new SyncCallback();
client.callProcedure(cb,
org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
new long[] {x}, new long[] {x}, x, new long[] {x},
new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
new double[] {x}, new String[] {"a"});
cb.waitForResponse();
// make sure the previous catalog change has completed
client.drain();
// now calling the new proc better fail
x = 5;
cb = new SyncCallback();
client.callProcedure(cb,
org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
new long[] {x}, new long[] {x}, x, new long[] {x},
new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
new double[] {x}, new String[] {"a"});
cb.waitForResponse();
assertNotSame(cb.getResponse().getStatus(), Status.OK);
loadSomeData(client, 60, 5);
// change the insert new order procedure
newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-conflict.jar");