@Test public void blockDeletionContextThrows() throws Throwable { Exception bdcException = new UnavailableException("block deletion context exception"); doThrow(bdcException).when(mMockBDC).close(); checkClose(bdcException); }
@Override public void close() throws UnavailableException { closeQuietly(mJournalContext); closeQuietly(mBlockDeletionContext); if (mThrown != null) { Throwables.propagateIfPossible(mThrown, UnavailableException.class); throw new RuntimeException(mThrown); } }
RpcContext implements Closeable, Supplier<JournalContext> { @Override public void close() throws UnavailableException { closeQuietly(mJournalContext); closeQuietly(mBlockDeletionContext); if (mThrown != null) { Throwables.propagateIfPossible(mThrown, UnavailableException.class); throw new RuntimeException(mThrown); } } }
RpcContext implements Closeable, Supplier<JournalContext> { @Override public void close() throws UnavailableException { closeQuietly(mJournalContext); closeQuietly(mBlockDeletionContext); if (mThrown != null) { Throwables.propagateIfPossible(mThrown, UnavailableException.class); throw new RuntimeException(mThrown); } } RpcContext(BlockDeletionContext blockDeleter, JournalContext journalContext,
      OperationContext operationContext); }
RpcContext implements Closeable, Supplier<JournalContext> { @Override public void close() throws UnavailableException { closeQuietly(mJournalContext); closeQuietly(mBlockDeletionContext); if (mThrown != null) { Throwables.propagateIfPossible(mThrown, UnavailableException.class); throw new RuntimeException(mThrown); } } RpcContext(BlockDeletionContext blockDeleter, JournalContext journalContext,
      OperationContext operationContext); JournalContext getJournalContext(); void journal(JournalEntry entry); BlockDeletionContext getBlockDeletionContext(); OperationContext getOperationContext(); void throwIfCancelled(); boolean isCancelled(); @Override void close(); @Override JournalContext get(); }
RpcContext implements Closeable, Supplier<JournalContext> { @Override public void close() throws UnavailableException { closeQuietly(mJournalContext); closeQuietly(mBlockDeletionContext); if (mThrown != null) { Throwables.propagateIfPossible(mThrown, UnavailableException.class); throw new RuntimeException(mThrown); } } RpcContext(BlockDeletionContext blockDeleter, JournalContext journalContext,
      OperationContext operationContext); JournalContext getJournalContext(); void journal(JournalEntry entry); BlockDeletionContext getBlockDeletionContext(); OperationContext getOperationContext(); void throwIfCancelled(); boolean isCancelled(); @Override void close(); @Override JournalContext get(); static final RpcContext NOOP; }