Search in sources :

Example 1 with ServerErrorResult

use of com.datastax.oss.simulacron.common.result.ServerErrorResult in project dsbulk by datastax.

the class SimulacronUtils method primeSystemPeersV2.

public static void primeSystemPeersV2(BoundCluster simulacron) {
    Query whenSelectSystemPeersV2 = new Query(SELECT_SYSTEM_PEERS_V2);
    ErrorResult thenThrowServerError = new ServerErrorResult("Unknown keyspace/cf pair (system.peers_v2)");
    RequestPrime primeSystemPeersV2 = new RequestPrime(whenSelectSystemPeersV2, thenThrowServerError);
    simulacron.prime(new Prime(primeSystemPeersV2));
}
Also used : Prime(com.datastax.oss.simulacron.common.stubbing.Prime) RequestPrime(com.datastax.oss.simulacron.common.cluster.RequestPrime) Query(com.datastax.oss.simulacron.common.request.Query) RequestPrime(com.datastax.oss.simulacron.common.cluster.RequestPrime) ErrorResult(com.datastax.oss.simulacron.common.result.ErrorResult) ServerErrorResult(com.datastax.oss.simulacron.common.result.ServerErrorResult) ServerErrorResult(com.datastax.oss.simulacron.common.result.ServerErrorResult)

Aggregations

RequestPrime (com.datastax.oss.simulacron.common.cluster.RequestPrime)1 Query (com.datastax.oss.simulacron.common.request.Query)1 ErrorResult (com.datastax.oss.simulacron.common.result.ErrorResult)1 ServerErrorResult (com.datastax.oss.simulacron.common.result.ServerErrorResult)1 Prime (com.datastax.oss.simulacron.common.stubbing.Prime)1