package org.openecomp.sdc.logging.slf4j;
-import org.openecomp.sdc.logging.provider.LoggingContextService;
+import org.openecomp.sdc.logging.spi.LoggingContextService;
import org.testng.annotations.Test;
import java.util.UUID;
AtomicBoolean complete = new AtomicBoolean(false);
// pass the callable to the context service first
- execute(ctx.toCallable(() -> {
+ execute(ctx.copyToCallable(() -> {
assertEquals(ctx.get(KEY), uuid, EXPECT_PROPAGATED_TO_CHILD);
complete.set(true);
return null;
AtomicBoolean innerComplete = new AtomicBoolean(false);
// should run with the context of main thread
- Callable inner = ctx.toCallable(() -> {
+ Callable inner = ctx.copyToCallable(() -> {
assertEquals(ctx.get(KEY), innerRandom, EXPECT_PROPAGATED_TO_CHILD);
innerComplete.set(true);
return null;
assertNull(ctx.get(KEY), EXPECT_EMPTY);
final AtomicBoolean complete = new AtomicBoolean(false);
- execute(ctx.toCallable(() -> {
+ execute(ctx.copyToCallable(() -> {
assertNull(ctx.get(KEY), EXPECT_EMPTY);
complete.set(true);
return null;
AtomicBoolean innerComplete = new AtomicBoolean(false);
// should run with the context of main thread
- Callable inner = ctx.toCallable((() -> {
+ Callable inner = ctx.copyToCallable((() -> {
assertEquals(ctx.get(KEY), innerRandom, EXPECT_PROPAGATED_TO_CHILD);
innerComplete.set(true);
return null;
// should run with the context of main thread
AtomicBoolean innerComplete = new AtomicBoolean(false);
- Callable inner = ctx.toCallable(() -> {
+ Callable inner = ctx.copyToCallable(() -> {
assertEquals(ctx.get(KEY), innerRandom, EXPECT_PROPAGATED_TO_CHILD);
innerComplete.set(true);
throw new IllegalArgumentException();