Search in sources :

Example 6 with DefaultInterceptorScopeInvocation

use of com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation in project pinpoint by naver.

the class DefaultScopeTest method testAttachment2.

@Test
public void testAttachment2() {
    String attachment = "context";
    InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
    transaction.tryEnter(ExecutionPolicy.ALWAYS);
    assertNull(transaction.getAttachment());
    transaction.setAttachment(attachment);
    transaction.canLeave(ExecutionPolicy.ALWAYS);
    transaction.leave(ExecutionPolicy.ALWAYS);
    transaction.tryEnter(ExecutionPolicy.ALWAYS);
    assertNull(transaction.getAttachment());
    transaction.canLeave(ExecutionPolicy.ALWAYS);
    transaction.leave(ExecutionPolicy.ALWAYS);
}
Also used : DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) InterceptorScopeInvocation(com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation) DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) Test(org.junit.Test)

Example 7 with DefaultInterceptorScopeInvocation

use of com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation in project pinpoint by naver.

the class DefaultScopeTest method testRemoveAttachmentFail.

@Test(expected = IllegalStateException.class)
public void testRemoveAttachmentFail() {
    InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
    transaction.removeAttachment();
}
Also used : DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) InterceptorScopeInvocation(com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation) DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) Test(org.junit.Test)

Example 8 with DefaultInterceptorScopeInvocation

use of com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation in project pinpoint by naver.

the class DefaultScopeTest method testAfterWithoutBefore2.

@Test(expected = IllegalStateException.class)
public void testAfterWithoutBefore2() {
    InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
    transaction.leave(ExecutionPolicy.BOUNDARY);
}
Also used : DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) InterceptorScopeInvocation(com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation) DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) Test(org.junit.Test)

Example 9 with DefaultInterceptorScopeInvocation

use of com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation in project pinpoint by naver.

the class DefaultScopeTest method testAfterWithoutBefore.

@Test(expected = IllegalStateException.class)
public void testAfterWithoutBefore() {
    InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
    transaction.leave(ExecutionPolicy.ALWAYS);
}
Also used : DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) InterceptorScopeInvocation(com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation) DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) Test(org.junit.Test)

Example 10 with DefaultInterceptorScopeInvocation

use of com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation in project pinpoint by naver.

the class DefaultScopeTest method testGetAttachmentFail.

@Test(expected = IllegalStateException.class)
public void testGetAttachmentFail() {
    InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
    transaction.getAttachment();
}
Also used : DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) InterceptorScopeInvocation(com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation) DefaultInterceptorScopeInvocation(com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation) Test(org.junit.Test)

Aggregations

InterceptorScopeInvocation (com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation)14 DefaultInterceptorScopeInvocation (com.navercorp.pinpoint.profiler.interceptor.scope.DefaultInterceptorScopeInvocation)14 Test (org.junit.Test)14