@Test public void testFailureOnAllPollThatSends() throws Exception { router = getNonBlockingRouter(); setOperationParams(CHUNK_SIZE, new GetBlobOptionsBuilder().build()); String blobId = router.putBlob(putBlobProperties, putUserMetadata, putChannel, new PutBlobOptionsBuilder().build()).get(); mockSelectorState.set(MockSelectorState.ThrowExceptionOnSend); Future future; try { future = router.getBlob(blobId, new GetBlobOptionsBuilder().operationType(GetBlobOptions.OperationType.BlobInfo).build()); while (!future.isDone()) { mockTime.sleep(routerConfig.routerRequestTimeoutMs + 1); Thread.yield(); } future.get(); Assert.fail("operation should have thrown"); } catch (ExecutionException e) { RouterException routerException = (RouterException) e.getCause(); Assert.assertEquals(RouterErrorCode.OperationTimedOut, routerException.getErrorCode()); } try { future = router.getBlob(blobId, options); while (!future.isDone()) { mockTime.sleep(routerConfig.routerRequestTimeoutMs + 1); Thread.yield(); } future.get(); Assert.fail("operation should have thrown"); } catch (ExecutionException e) { RouterException routerException = (RouterException) e.getCause(); Assert.assertEquals(RouterErrorCode.OperationTimedOut, routerException.getErrorCode()); } router.close(); }
void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time); }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time);  }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time);   }