Examples of TraceBuilder


Examples of com.jitlogic.zorka.core.spy.TraceBuilder

        this.flags = flags;
    }

    @Override
    public Map<String, Object> process(Map<String, Object> record) {
        TraceBuilder traceBuilder = tracer.getHandler();
        int traceId = symbolRegistry.symbolId(ObjectInspector.substitute(traceName, record));
        traceBuilder.traceBegin(traceId, System.currentTimeMillis(), flags);

        if (minimumTraceTime >= 0) {
            traceBuilder.setMinimumTraceTime(minimumTraceTime);
        }

        return record;
    }
View Full Code Here

Examples of com.linkedin.parseq.trace.TraceBuilder

  }

  @Override
  public Trace getTrace()
  {
    TraceBuilder builder = new TraceBuilderImpl();
    return builder.getTrace(this);
  }
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

   
    private final StackTraceFilter filter = new StackTraceFilter();
   
    @Test
    public void shouldFilterOutCglibGarbage() {
        StackTraceElement[] t = new TraceBuilder().classes(
            "MockitoExampleTest",
            "List$$EnhancerByMockitoWithCGLIB$$2c406024"
        ).toTraceArray();
       
        StackTraceElement[] filtered = filter.filter(t, false);
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

        assertThat(filtered, hasOnlyThoseClasses("MockitoExampleTest"));
    }
   
    @Test
    public void shouldFilterOutMockitoPackage() {
        StackTraceElement[] t = new TraceBuilder().classes(
            "org.test.MockitoSampleTest",
            "org.mockito.Mockito"
        ).toTraceArray();
           
        StackTraceElement[] filtered = filter.filter(t, false);
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

        assertThat(filtered, hasOnlyThoseClasses("org.test.MockitoSampleTest"));
    }
   
    @Test
    public void shouldFilterOutTracesMiddleBadTraces() {
        StackTraceElement[] t = new TraceBuilder().classes(
                "org.test.MockitoSampleTest",
                "org.test.TestSupport",
                "org.mockito.Mockito",
                "org.test.TestSupport",
                "org.mockito.Mockito"
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

        assertThat(filtered, hasOnlyThoseClasses("org.test.TestSupport", "org.test.MockitoSampleTest"));
    }
   
    @Test
    public void shouldKeepRunners() {
        StackTraceElement[] t = new TraceBuilder().classes(
                "org.mockito.runners.Runner",
                "junit.stuff",
                "org.test.MockitoSampleTest",
                "org.mockito.Mockito"
        ).toTraceArray();
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

        assertThat(filtered, hasOnlyThoseClasses("org.test.MockitoSampleTest", "junit.stuff", "org.mockito.runners.Runner"));
    }
   
    @Test
    public void shouldKeepInternalRunners() {
        StackTraceElement[] t = new TraceBuilder().classes(
                "org.mockito.internal.runners.Runner",
                "org.test.MockitoSampleTest"
        ).toTraceArray();
       
        StackTraceElement[] filtered = filter.filter(t, false);
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

    }
   
    @Test
    public void shouldStartFilteringAndKeepTop() {
        //given
        StackTraceElement[] t = new TraceBuilder().classes(
                "org.test.Good",
                "org.mockito.internal.Bad",
                "org.test.MockitoSampleTest"
        ).toTraceArray();
       
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

        assertThat(filtered, hasOnlyThoseClasses("org.test.MockitoSampleTest", "org.test.Good"));
    }

    @Test
    public void shouldKeepGoodTraceFromTheTopBecauseRealImplementationsOfSpiesSometimesThrowExceptions() {
        StackTraceElement[] t = new TraceBuilder().classes(
                "org.good.Trace",
                "org.yet.another.good.Trace",
                "org.mockito.internal.to.be.Filtered",
                "org.test.MockitoSampleTest"
        ).toTraceArray();
View Full Code Here

Examples of org.mockito.exceptions.base.TraceBuilder

    @Test
    public void shouldNotFilterWhenConfigurationSaysNo() {
        ConfigurationAccess.getConfig().overrideCleansStackTrace(false);
       
        Throwable t = new TraceBuilder().classes(
                "org.test.MockitoSampleTest",
                "org.mockito.Mockito"
        ).toThrowable();
       
        filter.filter(t);
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.