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);
}
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();
}
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);
}
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);
}
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();
}
Aggregations