Search in sources :

Example 6 with Pipeline

use of voldemort.store.routed.Pipeline in project voldemort by voldemort.

the class GetAllConfigureNodesTest method testConfigureNodesNotEnoughNodes.

@Test(expected = InsufficientOperationalNodesException.class)
public void testConfigureNodesNotEnoughNodes() throws Exception {
    for (Node node : cluster.getNodes()) failureDetector.recordException(node, 0, new UnreachableStoreException("Test for " + getClass().getName()));
    RoutingStrategy routingStrategy = new RouteToAllStrategy(cluster.getNodesShuffled());
    GetAllPipelineData pipelineData = new GetAllPipelineData();
    GetAllConfigureNodes action = new GetAllConfigureNodes(pipelineData, Event.COMPLETED, failureDetector, 1, 1, routingStrategy, Arrays.asList(aKey), null, null, null);
    Pipeline pipeline = new Pipeline(Operation.GET, 10000, TimeUnit.MILLISECONDS);
    pipeline.addEventAction(Event.STARTED, action);
    pipeline.addEvent(Event.STARTED);
    pipeline.execute();
    throw pipelineData.getFatalError();
}
Also used : RouteToAllStrategy(voldemort.routing.RouteToAllStrategy) GetAllPipelineData(voldemort.store.routed.GetAllPipelineData) Node(voldemort.cluster.Node) RoutingStrategy(voldemort.routing.RoutingStrategy) UnreachableStoreException(voldemort.store.UnreachableStoreException) Pipeline(voldemort.store.routed.Pipeline) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 RoutingStrategy (voldemort.routing.RoutingStrategy)6 Pipeline (voldemort.store.routed.Pipeline)6 Node (voldemort.cluster.Node)4 RouteToAllStrategy (voldemort.routing.RouteToAllStrategy)4 BasicPipelineData (voldemort.store.routed.BasicPipelineData)4 ZoneRoutingStrategy (voldemort.routing.ZoneRoutingStrategy)3 GetAllPipelineData (voldemort.store.routed.GetAllPipelineData)2 ArrayList (java.util.ArrayList)1 Cluster (voldemort.cluster.Cluster)1 FailureDetector (voldemort.cluster.failuredetector.FailureDetector)1 FailureDetectorConfig (voldemort.cluster.failuredetector.FailureDetectorConfig)1 ThresholdFailureDetector (voldemort.cluster.failuredetector.ThresholdFailureDetector)1 RouteToAllLocalPrefStrategy (voldemort.routing.RouteToAllLocalPrefStrategy)1 UnreachableStoreException (voldemort.store.UnreachableStoreException)1 ByteArray (voldemort.utils.ByteArray)1