@Override public MasterKeepAliveConnection getMaster() throws IOException { if (this.localHostClient instanceof MasterService.BlockingInterface) { return new ShortCircuitMasterConnection( (MasterService.BlockingInterface) this.localHostClient); } return super.getMaster(); } }
Mockito.when(mockConnection.getMaster()).thenReturn(mockMaster);
private GetProcedureResultResponse.State getState(long procId) throws MasterNotRunningException, IOException, ServiceException { MasterProtos.MasterService.BlockingInterface master = ((ConnectionImplementation) UTIL.getConnection()).getMaster(); GetProcedureResultResponse resp = master.getProcedureResult(null, GetProcedureResultRequest.newBuilder().setProcId(procId).build()); return resp.getState(); }
Mockito.when(mockConnection.getMaster()).thenReturn(master); SnapshotResponse response = SnapshotResponse.newBuilder().setExpectedTimeout(0).build(); Mockito.when(
@Override public MasterKeepAliveConnection getMaster() throws IOException { if (this.localHostClient instanceof MasterService.BlockingInterface) { return new ShortCircuitMasterConnection((MasterService.BlockingInterface)this.localHostClient); } return super.getMaster(); } }
Mockito.when(mockConnection.getMaster()).thenReturn(mockMaster);
Mockito.when(mockConnection.getMaster()).thenReturn(master); SnapshotResponse response = SnapshotResponse.newBuilder().setExpectedTimeout(0).build(); Mockito.when(
@Override public MasterKeepAliveConnection getMaster() throws IOException { if (this.localHostClient instanceof MasterService.BlockingInterface) { return new ShortCircuitMasterConnection((MasterService.BlockingInterface)this.localHostClient); } return super.getMaster(); } }
private GetProcedureResultResponse.State getState(long procId) throws MasterNotRunningException, IOException, ServiceException { MasterProtos.MasterService.BlockingInterface master = ((ConnectionImplementation) UTIL.getConnection()).getMaster(); GetProcedureResultResponse resp = master.getProcedureResult(null, GetProcedureResultRequest.newBuilder().setProcId(procId).build()); return resp.getState(); }