}
void verifyUACfromMasterToReplica() throws Exception
{
// uac from master?
TxnEgo txnid = TxnEgo.makeZero(MpInitiator.MP_INIT_PID);
Object[] params = new Object[2];
params[0] = ClientUtils.fileToBytes(new File(m_pathToCatalog));
params[1] = null;
txnid = txnid.makeNext();
// We're going to get odd responses for the sentinels, so catch and ignore the exceptions
try {
((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L, "@SendSentinel", 0);
} catch (ProcCallException pce) {}
try {
((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L, "@SendSentinel", 1);
} catch (ProcCallException pce) {}
ClientResponse r = ((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L,
"@UpdateApplicationCatalog", params);
assertEquals(ClientResponse.SUCCESS, r.getStatus());
// adhoc queries still work
verifyAdhocQuery();
// undo our previous catalog update through the remote side so the promote test works
params = new Object[2];
params[0] = ClientUtils.fileToBytes(new File(m_pathToOtherCatalog));
params[1] = null;
txnid = txnid.makeNext();
// We're going to get odd responses for the sentinels, so catch and ignore the exceptions
try {
((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L, "@SendSentinel", 0);
} catch (ProcCallException pce) {}
try {
((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L, "@SendSentinel", 1);
} catch (ProcCallException pce) {}
r = ((ClientImpl)m_client).callProcedure(txnid.getTxnId(), 0L,
"@UpdateApplicationCatalog", params);
assertEquals(ClientResponse.SUCCESS, r.getStatus());
}