/** * Does nothing but exercise a {@link CallRunner} outside of {@link RpcServer} context. */ @Test public void testSimpleCall() { RpcServerInterface mockRpcServer = Mockito.mock(RpcServerInterface.class); Mockito.when(mockRpcServer.isStarted()).thenReturn(true); ServerCall mockCall = Mockito.mock(ServerCall.class); CallRunner cr = new CallRunner(mockRpcServer, mockCall); cr.setStatus(new MonitoredRPCHandlerImpl()); cr.run(); } }
this.addr, timeout, this.callCleanup); if (!this.rpcServer.scheduler.dispatch(new CallRunner(this.rpcServer, call))) { this.rpcServer.callQueueSizeInBytes.add(-1 * call.getSize()); this.rpcServer.metrics.exception(RpcServer.CALL_QUEUE_TOO_BIG_EXCEPTION);
/** * Does nothing but exercise a {@link CallRunner} outside of {@link RpcServer} context. */ @Test public void testSimpleCall() { RpcServerInterface mockRpcServer = Mockito.mock(RpcServerInterface.class); Mockito.when(mockRpcServer.isStarted()).thenReturn(true); ServerCall mockCall = Mockito.mock(ServerCall.class); CallRunner cr = new CallRunner(mockRpcServer, mockCall); cr.setStatus(new MonitoredRPCHandlerImpl()); cr.run(); } }
totalRequestSize, traceInfo, this.addr); if (!scheduler.dispatch(new CallRunner(RpcServer.this, call))) { callQueueSize.add(-1 * call.getSize());