Search in sources :

Example 41 with ClientResponse

use of org.voltdb.client.ClientResponse in project voltdb by VoltDB.

the class TestLiveDDLSchemaSwitch method verifyDeploymentOnlyUAC.

void verifyDeploymentOnlyUAC() throws Exception {
    int timeout = getHeartbeatTimeout();
    assertEquals(org.voltcore.common.Constants.DEFAULT_HEARTBEAT_TIMEOUT_SECONDS, timeout);
    ClientResponse results = m_client.updateApplicationCatalog(null, new File(m_pathToOtherDeployment));
    assertEquals(ClientResponse.SUCCESS, results.getStatus());
    timeout = getHeartbeatTimeout();
    assertEquals(6, timeout);
}
Also used : ClientResponse(org.voltdb.client.ClientResponse) File(java.io.File)

Example 42 with ClientResponse

use of org.voltdb.client.ClientResponse in project voltdb by VoltDB.

the class TestNTProcs method getStats.

// get the first stats table for any selector
final VoltTable getStats(Client client, String selector) {
    ClientResponse response = null;
    try {
        response = client.callProcedure("@Statistics", selector);
    } catch (IOException | ProcCallException e) {
        fail();
    }
    assertEquals(ClientResponse.SUCCESS, response.getStatus());
    return response.getResults()[0];
}
Also used : ClientResponse(org.voltdb.client.ClientResponse) IOException(java.io.IOException) ProcCallException(org.voltdb.client.ProcCallException)

Example 43 with ClientResponse

use of org.voltdb.client.ClientResponse in project voltdb by VoltDB.

the class TestVoltProcedure method testNullBoxedShort.

public void testNullBoxedShort() {
    ClientResponse r = call(BoxedShortProcedure.class);
    assertEquals(null, BoxedShortProcedure.arg);
    assertEquals(ClientResponse.SUCCESS, r.getStatus());
}
Also used : ClientResponse(org.voltdb.client.ClientResponse)

Example 44 with ClientResponse

use of org.voltdb.client.ClientResponse in project voltdb by VoltDB.

the class TestVoltProcedure method testNullPointerException.

public void testNullPointerException() {
    ClientResponse r = call(NPEProcedure.class);
    assertEquals(ClientResponse.UNEXPECTED_FAILURE, r.getStatus());
    System.out.println(r.getStatusString());
    assertTrue(r.getStatusString().contains("java.lang.NullPointerException"));
}
Also used : ClientResponse(org.voltdb.client.ClientResponse)

Example 45 with ClientResponse

use of org.voltdb.client.ClientResponse in project voltdb by VoltDB.

the class TestVoltProcedure method testNullInteger.

public void testNullInteger() {
    ClientResponse r = call(IntegerProcedure.class);
    assertEquals(VoltType.NULL_INTEGER, IntegerProcedure.arg);
    assertEquals(ClientResponse.SUCCESS, r.getStatus());
}
Also used : ClientResponse(org.voltdb.client.ClientResponse)

Aggregations

ClientResponse (org.voltdb.client.ClientResponse)385 VoltTable (org.voltdb.VoltTable)195 Client (org.voltdb.client.Client)184 ProcCallException (org.voltdb.client.ProcCallException)107 IOException (java.io.IOException)54 NoConnectionsException (org.voltdb.client.NoConnectionsException)35 Test (org.junit.Test)32 ProcedureCallback (org.voltdb.client.ProcedureCallback)32 VoltProjectBuilder (org.voltdb.compiler.VoltProjectBuilder)29 Configuration (org.voltdb.VoltDB.Configuration)28 File (java.io.File)19 Timestamp (java.sql.Timestamp)16 VoltDB (org.voltdb.VoltDB)16 InMemoryJarfile (org.voltdb.utils.InMemoryJarfile)16 VoltCompiler (org.voltdb.compiler.VoltCompiler)15 JSONException (org.json_voltpatches.JSONException)11 BigDecimal (java.math.BigDecimal)10 ExecutionException (java.util.concurrent.ExecutionException)10 ClientResponseImpl (org.voltdb.ClientResponseImpl)10 KeeperException (org.apache.zookeeper_voltpatches.KeeperException)9