use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class ThreadLocalScopeTest method pushPop.
@Test
public void pushPop() {
InterceptorScopeInvocation scope = new ThreadLocalScope(new DefaultInterceptorScopeDefinition("test"));
Assert.assertTrue(scope.tryEnter(ExecutionPolicy.BOUNDARY));
Assert.assertFalse(scope.tryEnter(ExecutionPolicy.BOUNDARY));
Assert.assertFalse(scope.tryEnter(ExecutionPolicy.BOUNDARY));
Assert.assertTrue(scope.isActive());
Assert.assertFalse(scope.canLeave(ExecutionPolicy.BOUNDARY));
Assert.assertFalse(scope.canLeave(ExecutionPolicy.BOUNDARY));
Assert.assertTrue(scope.canLeave(ExecutionPolicy.BOUNDARY));
scope.leave(ExecutionPolicy.BOUNDARY);
}
Aggregations