MCPcopy Create free account
hub / github.com/grpc/grpc-java / fixedContextExecutor

Method fixedContextExecutor

api/src/test/java/io/grpc/ContextTest.java:572–580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570 }
571
572 @Test
573 public void fixedContextExecutor() {
574 Context base = Context.current().withValue(PET, "cat");
575 QueuedExecutor queuedExecutor = new QueuedExecutor();
576 base.fixedContextExecutor(queuedExecutor).execute(runner);
577 assertEquals(1, queuedExecutor.runnables.size());
578 queuedExecutor.runnables.remove().run();
579 assertSame(base, observed);
580 }
581
582 @Test
583 public void typicalTryFinallyHandling() {

Callers

nothing calls this directly

Calls 8

currentMethod · 0.95
fixedContextExecutorMethod · 0.95
withValueMethod · 0.80
assertEqualsMethod · 0.80
sizeMethod · 0.65
runMethod · 0.65
removeMethod · 0.65
executeMethod · 0.45

Tested by

no test coverage detected