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

Method answer

netty/src/test/java/io/grpc/netty/WriteQueueTest.java:76–81  ·  view source on GitHub ↗
(InvocationOnMock invocation)

Source from the content-addressed store, hash-verified

74 EventLoop eventLoop = Mockito.mock(EventLoop.class);
75 doAnswer(new Answer<Void>() {
76 @Override
77 public Void answer(InvocationOnMock invocation) throws Throwable {
78 Runnable r = (Runnable) invocation.getArguments()[0];
79 r.run();
80 return null;
81 }
82 }).when(eventLoop).execute(any(Runnable.class));
83 when(eventLoop.inEventLoop()).thenReturn(true);
84 when(channel.eventLoop()).thenReturn(eventLoop);

Callers

nothing calls this directly

Calls 2

runMethod · 0.65
nanoTimeMethod · 0.65

Tested by

no test coverage detected