Examples of preProcess()


Examples of org.apache.helix.controller.stages.CompatibilityCheckStage.preProcess()

  public void testIncompatible() {
    prepare("0.6.1-incubating-SNAPSHOT", "0.3.4", "0.4");
    CompatibilityCheckStage stage = new CompatibilityCheckStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    try {
      stage.process(event);
      Assert
          .fail("Should fail since participant version is less than the minimum participant version supported by controller");
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.helix.controller.stages.CompatibilityCheckStage.preProcess()

  public void testCompatible() {
    prepare("0.4.0", "0.4.0");
    CompatibilityCheckStage stage = new CompatibilityCheckStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    try {
      stage.process(event);
    } catch (Exception e) {
      Assert.fail("Should not fail since versions are compatible", e);
    }
View Full Code Here

Examples of org.apache.helix.controller.stages.CompatibilityCheckStage.preProcess()

  public void testNullParticipantVersion() {
    prepare("0.4.0", null);
    CompatibilityCheckStage stage = new CompatibilityCheckStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    try {
      stage.process(event);
    } catch (Exception e) {
      Assert
          .fail("Should not fail since compatibility check will be skipped if participant version is null");
View Full Code Here

Examples of org.apache.helix.controller.stages.CompatibilityCheckStage.preProcess()

  public void testNullControllerVersion() {
    prepare(null, "0.4.0");
    CompatibilityCheckStage stage = new CompatibilityCheckStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    try {
      stage.process(event);
    } catch (Exception e) {
      Assert
          .fail("Should not fail since compatibility check will be skipped if controller version is null");
View Full Code Here

Examples of org.apache.helix.controller.stages.ResourceComputationStage.preProcess()

  {
    ClusterEvent event = new ClusterEvent("sampleEvent");
    ResourceComputationStage stage = new ResourceComputationStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    boolean exceptionCaught = false;
    try
    {
      stage.process(event);
    } catch (Exception e)
View Full Code Here

Examples of org.apache.helix.controller.stages.ResourceComputationStage.preProcess()

  public void testNull() {
    ClusterEvent event = new ClusterEvent("sampleEvent");
    ResourceComputationStage stage = new ResourceComputationStage();
    StageContext context = new StageContext();
    stage.init(context);
    stage.preProcess();
    boolean exceptionCaught = false;
    try {
      stage.process(event);
    } catch (Exception e) {
      exceptionCaught = true;
View Full Code Here

Examples of org.apache.http.protocol.HttpRequestExecutor.preProcess()

                request.setEntity(requestBodies[i]);
                System.out.println(">> Request URI: " + request.getRequestLine().getUri());

                context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
                request.setParams(params);
                httpexecutor.preProcess(request, httpproc, context);
                HttpResponse response = httpexecutor.execute(request, conn, context);
                httpexecutor.postProcess(response, httpproc, context);
               
                System.out.println("<< Response: " + response.getStatusLine());
                System.out.println(EntityUtils.toString(response.getEntity()));
View Full Code Here

Examples of org.apache.http.protocol.HttpRequestExecutor.preProcess()

                BasicHttpRequest request = new BasicHttpRequest("GET", targets[i]);
                System.out.println(">> Request URI: " + request.getRequestLine().getUri());
               
                context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
                request.setParams(params);
                httpexecutor.preProcess(request, httpproc, context);
                HttpResponse response = httpexecutor.execute(request, conn, context);
                httpexecutor.postProcess(response, httpproc, context);
               
                System.out.println("<< Response: " + response.getStatusLine());
                System.out.println(EntityUtils.toString(response.getEntity()));
View Full Code Here

Examples of org.apache.http.protocol.HttpRequestExecutor.preProcess()

            if(soapAddress != null)
                request.addHeader("SOAPAction", soapAddress);

            request.addHeader("Host", url.getHost());

            httpexecutor.preProcess(request, httpproc, context);

            HttpResponse response = httpexecutor.execute(request, conn, context);
            httpexecutor.postProcess(response, httpproc, context);

            if (!connStrategy.keepAlive(response, context))
View Full Code Here

Examples of org.apache.http.protocol.HttpRequestExecutor.preProcess()

                request.addHeader("SOAPAction", soapAddress);

            request.addHeader("Host", url.getHost());
            request.addHeader("Accept", "text/*");

            httpexecutor.preProcess(request, httpproc, context);

            HttpResponse response = httpexecutor.execute(request, conn, context);
            httpexecutor.postProcess(response, httpproc, context);

            String resultStr = EntityUtils.toString(response.getEntity());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.