Package com.linkedin.parseq.trace

Examples of com.linkedin.parseq.trace.Trace


  {
    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
    _codec.encode(trace, baos);
    final byte[] json = baos.toByteArray();

    final Trace deserialized;
    try
    {
      deserialized = _codec.decode(new ByteArrayInputStream(json));
    }
    catch (IOException e)
View Full Code Here


  private void assertReversibleString(final Trace trace) throws IOException
  {
    final String json =_codec.encode(trace);

    final Trace deserialized;
    try
    {
      deserialized = _codec.decode(json);
    }
    catch (IOException e)
View Full Code Here

                                    {
                                      RestResponse response = EasyMock.createMock(RestResponse.class);
                                      RequestExecutionReportBuilder executionReportBuilder =
                                         new RequestExecutionReportBuilder();
                                      JsonTraceCodec jsonTraceCodec = new JsonTraceCodec();
                                      Trace t = null;

                                      try
                                      {
                                        t = jsonTraceCodec.decode(TEST_TRACE);
                                        executionReportBuilder.setParseqTrace(t);
View Full Code Here

    String mediaType = HEADER_VALUE_APPLICATION_JSON;
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

    try
    {
      Trace trace = executionReport.getParseqTrace();

      if (trace != null)
      {
        //Serialize the Parseq trace into JSON.
        JsonTraceCodec traceCodec = new JsonTraceCodec();
View Full Code Here

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

    try
    {
      IOUtils.copy(resourceStream, outputStream);
      Trace trace = executionReport.getParseqTrace();

      if (trace != null)
      {
        //Serialize the Parseq trace into JSON and then inject a javascript into the response
        //which will call the corresponding render function on the entry page html with the JSON
View Full Code Here

    JsonTraceCodec codec = new JsonTraceCodec();

    try
    {
      Trace trace = codec.decode(traceRawStream);
      Assert.assertNotNull(trace);
      Assert.assertNotNull(trace.getValue());
      Assert.assertNotEquals(trace.getValue(), "");
    }
    catch (IOException exc)
    {
      Assert.fail("Parseq trace cannot be decoded. Details: " + exc.getMessage());
    }
View Full Code Here

TOP

Related Classes of com.linkedin.parseq.trace.Trace

Copyright © 2018 www.massapicom. 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.