Package com.linkedin.databus2.test.container

Examples of com.linkedin.databus2.test.container.SimpleObjectCaptureHandler.clear()


            }
          }, "client processes /sources response", 100, log);

          log.info("process the /register request");
          NettyTestUtils.waitForHttpRequest(objCapture, "/register.*", 1000);
          objCapture.clear();

          log.info("SEND BACK THE /register RESPONSE");
          //clientConn.getRelayDispatcher().getLog().setLevel(Level.DEBUG);
          //RangeBasedReaderWriterLock.LOG.setLevel(Level.DEBUG);
          body = new DefaultHttpChunk(
View Full Code Here


          log.info("PROCESS the /stream CALL AND RETURN A PARTIAL WINDOW");
          streamMatcher =
              NettyTestUtils.waitForHttpRequest(objCapture, "/stream.*checkPoint=([^&]*)&.*",
                                                1000);
          cpString = streamMatcher.group(1);
          objCapture.clear();

          respStartOfs = eventOfs.get(2).get(1);
          respEndOfs = eventOfs.get(2).get(84);

          log.debug("Checkpoint String is :" + cpString);
View Full Code Here

                   protocolVersionHeader,
                   responseStr,
                   expectedRegisterState);

      callback.clearLastMsg();
      objCapture.clear();
    }
    finally
    {
      conn.close();
      callback.shutdown();
View Full Code Here

                    TestResponseProcessors.TestConnectionStateMessage.State.SOURCES_RESPONSE_ERROR,
                    log);
    Assert.assertNull(remoteExceptionHandler.getLastException());
    Assert.assertEquals(1, callback.getAllMsgs().size());
    callback.clearLastMsg();
    objCapture.clear();
  }

  private void runServerRegisterReadTimeoutIteration(final Logger log,
                                     TestingConnectionCallback callback,
                                     DummyRemoteExceptionHandler remoteExceptionHandler,
View Full Code Here

                    TestResponseProcessors.TestConnectionStateMessage.State.REGISTER_RESPONSE_ERROR,
                    log);
    Assert.assertNull(remoteExceptionHandler.getLastException());
    Assert.assertEquals(1, callback.getAllMsgs().size());
    callback.clearLastMsg();
    objCapture.clear();
  }

  private void runServerStreamReadTimeoutIteration(final Logger log,
                                     TestingConnectionCallback callback,
                                     DummyRemoteExceptionHandler remoteExceptionHandler,
View Full Code Here

                         objCapture,
                         sourcesResp);

    //send partial /stream
    callback.clearLastMsg();
    objCapture.clear();
    Checkpoint cp = new Checkpoint();
    cp.setFlexible();
    CheckpointMult cpm = new CheckpointMult();
    cpm.addCheckpoint(PhysicalPartition.ANY_PHYSICAL_PARTITION, cp);
    conn.requestStream("1", null, 1000, cpm, null, msg);
View Full Code Here

                    log);
    Assert.assertNull(remoteExceptionHandler.getLastException());
    Assert.assertEquals(1, callback.getAllMsgs().size());

    callback.clearLastMsg();
    objCapture.clear();
  }

  private void runServerPartialStreamTimeoutIteration(final Logger log,
                                     DbusEventBuffer buf,
                                     TestingConnectionCallback callback,
View Full Code Here

                         objCapture,
                         sourcesResp);

    //send partial /stream
    callback.clearLastMsg();
    objCapture.clear();
    Checkpoint cp = new Checkpoint();
    cp.setFlexible();
    CheckpointMult cpm = new CheckpointMult();
    cpm.addCheckpoint(PhysicalPartition.ANY_PHYSICAL_PARTITION, cp);
    conn.requestStream("1", null, 1000, cpm, null, msg);
View Full Code Here

                    log);
    Assert.assertNull(remoteExceptionHandler.getLastException());
    Assert.assertEquals(1, callback.getAllMsgs().size());

    callback.clearLastMsg();
    objCapture.clear();
}

  private void runServerSourcesDisconnectIteration(final Logger log,
                                                   TestingConnectionCallback callback,
                                                   DummyRemoteExceptionHandler remoteExceptionHandler,
View Full Code Here

                    TestResponseProcessors.TestConnectionStateMessage.State.SOURCES_RESPONSE_ERROR,
                    log);
    Assert.assertNull(remoteExceptionHandler.getLastException());
    Assert.assertEquals(1, callback.getAllMsgs().size());
    callback.clearLastMsg();
    objCapture.clear();
  }

  private void runServerRegisterDisconnectIteration(final Logger log,
                                     TestingConnectionCallback callback,
                                     DummyRemoteExceptionHandler remoteExceptionHandler,
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.